Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th April 2006, 14:24
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Default Server Monitoring With munin And monit - Page 2

Falko,

On the Debian server i want to monitor there is ISPConfig installed.
Can i enable SSL and create a certicate via ISPConfig in stead of doing this:

Now we create the certificate like this:

Now we must create the file /var/www/www.example.com/web/monit/token and write some random string into it:

mkdir /var/www/www.example.com/web/monit
echo "hello" > /var/www/www.example.com/web/monit/token

Next we create the pem cert (/var/certs/monit.pem) we need for the SSL-encrypted monit web interface:

mkdir /var/certs
cd /var/certs

We need an OpenSSL configuration file to create our certificate. It can look like this:

vi /var/certs/monit.cnf

# create RSA certs - Server


RANDFILE = ./openssl.rnd


[ req ]

default_bits = 1024

encrypt_key = yes

distinguished_name = req_dn

x509_extensions = cert_type


[ req_dn ]

countryName = Country Name (2 letter code)

countryName_default = MO


stateOrProvinceName = State or Province Name (full name)

stateOrProvinceName_default = Monitoria


localityName = Locality Name (eg, city)

localityName_default = Monittown


organizationName = Organization Name (eg, company)

organizationName_default = Monit Inc.


organizationalUnitName = Organizational Unit Name (eg, section)

organizationalUnitName_default = Dept. of Monitoring Technologies


commonName = Common Name (FQDN of your server)

commonName_default = server.monit.mo


emailAddress = Email Address

emailAddress_default = root@monit.mo


[ cert_type ]

nsCertType = server

Now we create the certificate like this:

openssl req -new -x509 -days 365 -nodes -config ./monit.cnf -out /var/certs/monit.pem -keyout /var/certs/monit.pem
openssl gendh 512 >> /var/certs/monit.pem
openssl x509 -subject -dates -fingerprint -noout -in /var/certs/monit.pem
chmod 700 /var/certs/monit.pem


---
Hans
Reply With Quote
Sponsored Links
  #2  
Old 27th April 2006, 16:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

No. The certificate is for the monit web interface on port 2812; it has nothing to do with your Apache web sites.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 27th April 2006, 22:20
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Thumbs up Learning all the time

Thanks Falko,

I had to ask you that because i do not know a lot about SSL and certificates.

I want you to know that Monit and Munin are up and running now on my Debian server.

Now i am going to create a new small website for my subdomain:
monitor.myhostingcompany.tld and i integrate the links under the buttons to Monit and Munin. I also add some other administrative tools too.

It looks really cool already.

Thanks again for this really nice "How to".

Hans
Reply With Quote
The Following User Says Thank You to Hans For This Useful Post:
enufalpacle (16th November 2012)
  #4  
Old 27th April 2006, 22:38
sjau sjau is offline
Local Meanie
 
Join Date: Apr 2006
Location: Switzerland
Posts: 1,146
Thanks: 4
Thanked 55 Times in 51 Posts
Default

Another nice "stats/monitoring" tool is mailgraph. Maybe you also want to include it into your monitoring subdomain ^^

http://people.ee.ethz.ch/~dws/software/mailgraph/
Reply With Quote
  #5  
Old 28th April 2006, 06:40
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
Default Monit alert

Nice to know.

I received two times an e-mail from the system since i have installed monit:

The contents is:

Changed Service postfix

Date: Thu, 27 Apr 2006 23:59:08 +0200
Action: alert
Host: server1.mydomain.tld

Your faithful employee,
monit

'postfix' process PID changed to <IDnr>

Why do i receive this and is it something to worry about?
Reply With Quote
The Following User Says Thank You to Hans For This Useful Post:
enufalpacle (16th November 2012)
  #6  
Old 28th April 2006, 14:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by Hans
Nice to know.

I received two times an e-mail from the system since i have installed monit:

The contents is:

Changed Service postfix

Date: Thu, 27 Apr 2006 23:59:08 +0200
Action: alert
Host: server1.mydomain.tld

Your faithful employee,
monit

'postfix' process PID changed to <IDnr>

Why do i receive this and is it something to worry about?
This means that Postfix has been restarted and has a different PID now. It's just a notification. Postfix has been restarted by an ISPConfig cron job, so that's ok.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
enufalpacle (16th November 2012)
  #7  
Old 28th April 2006, 16:17
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 212
Thanked 648 Times in 294 Posts
 
Smile

Good to know.

The info generated by the two apps is really nice.
I have to teach about the interpretation. But everything looks good.

Hans
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.