#1  
Old 9th May 2006, 10:00
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 210
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Question 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
Reply With Quote
Sponsored Links
  #2  
Old 9th May 2006, 12:34
Norman Norman is offline
HowtoForge Supporter
 
Join Date: May 2006
Posts: 240
Thanks: 0
Thanked 16 Times in 14 Posts
Default

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.
Reply With Quote
  #3  
Old 9th May 2006, 12:53
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 210
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default 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
Reply With Quote
  #4  
Old 9th May 2006, 17:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

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.
__________________
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
  #5  
Old 9th May 2006, 18:10
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 210
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

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)
Reply With Quote
  #6  
Old 9th May 2006, 23:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

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.
__________________
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
  #7  
Old 31st July 2006, 19:12
nenad nenad is offline
Senior Member
 
Join Date: Nov 2005
Location: Novi Sad, Serbia
Posts: 414
Thanks: 13
Thanked 5 Times in 5 Posts
Default

What exactly "10" in this statement means:


Code:
if loadavg(5min) greater than 10 for 8 cycles then stop
__________________
Nenad Bulatovic
---------------
Debian Lenny & ISPConfig 3
Reply With Quote
  #8  
Old 1st August 2006, 13:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

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
__________________
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
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
munin permissions sjau HOWTO-Related Questions 10 17th April 2009 17:27
Extension for the monit and munin programs(tut from falko) ColdDoT Server Operation 7 4th May 2006 11:37
Server Monitoring With munin And monit - Page 2 Hans Server Operation 6 28th April 2006 16:17


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


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