HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Munin & Monit (http://www.howtoforge.com/forums/showthread.php?t=4168)

Hans 9th May 2006 11:00

Munin & Monit
 
I have setup Munin & Monit on my Debian system according Falko's How to and i have a question about this.

Before i did this it was never necessary to restart Postfix.
Since i have installed Munin & Monit, every night at 0:00 hour Monit restarts Postfix, so a new PID-file is created.
What is the reason for this?

Hans

Norman 9th May 2006 13:34

Might it be possible that munin is bugged so it doesnt recognize a new day?
I doubt that however.

Another reason might simply be that the timeout is set very low in /etc/monitrc so it restarts postfix when there's a lot of cron-activity around midnight.

Check your monit log for more info and then change your config accordingly to wait longer.

Hans 9th May 2006 13:53

This is the contents of my monitrc file
 
check process proftpd with pidfile /var/run/proftpd.pid
start program = "/etc/init.d/proftpd start"
stop program = "/etc/init.d/proftpd stop"
if failed port 21 protocol ftp then restart
if 5 restarts within 5 cycles then timeout

check process sshd with pidfile /var/run/sshd.pid
start program "/etc/init.d/ssh start"
stop program "/etc/init.d/ssh stop"
if failed port 22 protocol ssh then restart
if 5 restarts within 5 cycles then timeout

check process mysql with pidfile /var/run/mysqld/mysqld.pid
group database
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
if failed host 127.0.0.1 port 3306 then restart
if 5 restarts within 5 cycles then timeout

check process apache with pidfile /var/run/apache2.pid
group www
start program = "/etc/init.d/apache2 start"
stop program = "/etc/init.d/apache2 stop"
if failed host www.myhostingcompany.tld port 80 protocol http
and request "/monit/token" then restart
if cpu is greater than 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if totalmem > 500 MB for 5 cycles then restart
if children > 250 then restart
if loadavg(5min) greater than 10 for 8 cycles then stop
if 3 restarts within 5 cycles then timeout

check process postfix with pidfile /var/spool/postfix/pid/master.pid
group mail
start program = "/etc/init.d/postfix start"
stop program = "/etc/init.d/postfix stop"
if failed port 25 protocol smtp then restart
if 5 restarts within 5 cycles then timeout

Seems to be ok, i guess or do you have any sugestions?

Hans

falko 9th May 2006 18:01

Quote:

Originally Posted by Hans
Before i did this it was never necessary to restart Postfix.
Since i have installed Munin & Monit, every night at 0:00 hour Monit restarts Postfix, so a new PID-file is created.

It's not monit who restarts Postfix, it's ISPConfig (in order to generate thetraffic statistics). monit just sends you a notification that Postfix has been restarted.

Hans 9th May 2006 19:10

Falko,

So with other words... restarting Postfix at night by ISPConfig is normal, which means that i can expect this every day?

(My box is full of surprises) :D

falko 10th May 2006 00:02

Quote:

Originally Posted by Hans
So with other words... restarting Postfix at night by ISPConfig is normal, which means that i can expect this every day?

Yes, that's right.

nenad 31st July 2006 20:12

What exactly "10" in this statement means:


Code:

if loadavg(5min) greater than 10 for 8 cycles then stop

falko 1st August 2006 14:38

It's the 5 min. load average. When you run
Code:

uptime
, it's the value in the middle:

Code:

13:37:41 up 50 days, 13:43,  1 user,  load average: 0.10, 0.12, 0.05

nenad 2nd August 2006 02:20

Quote:

load average: 0.10, 0.12, 0.05
OK, then 0.12 means 12% of load?

Then isn't 10 in

Quote:

if loadavg(5min) greater than 10 for 8 cycles then stop
just to small? 10% of load?

falko 3rd August 2006 15:52

Quote:

Originally Posted by nenad
OK, then 0.12 means 12% of load?

Then isn't 10 in



just to small? 10% of load?

1 means 100%, so 10 means 1000%. Have a look here: http://en.wikipedia.org/wiki/Load_average


All times are GMT +2. The time now is 00:54.

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