Current time: 11-15-2024, 08:04 AM Hello There, Guest! (LoginRegister)


Post Reply 
[How-to] Configure MONIT to monitorize your server
Author Message
tioan Offline
Junior Member
*

Posts: 22
Joined: Dec 2006
Reputation: 0
Post: #11
RE: [How-to] Configure MONIT to monitorize your server
Here some config stuff to monitoring courier authdaemon/popd/imapd

Code:
# courier_authdaemon
check process authdaemon with pidfile /var/run/courier/authdaemon/pid
   group services
   start program = "/etc/init.d/courier-authdaemon start"
   stop  program = "/etc/init.d/courier-authdaemon stop"
   if 5 restarts within 5 cycles then timeout

# courier_imapd
check process imapd with pidfile /var/run/courier/imapd.pid
   group services
   start program = "/etc/init.d/courier-imap start"
   stop  program = "/etc/init.d/courier-imap stop"
   if 5 restarts within 5 cycles then timeout
   if failed port 143 protocol imap then restart

## courier_imapd-ssl
#check process imapd-ssl with pidfile /var/run/courier/imapd-ssl.pid
#   group services
#   start program = "/etc/init.d/courier-imap-ssl start"
#   stop  program = "/etc/init.d/courier-imap-ssl stop"
#   if 5 restarts within 5 cycles then timeout

# courier_pop3d
check process pop3 with pidfile /var/run/courier/pop3d.pid
   group services
   start program = "/etc/init.d/courier-pop start"
   stop  program = "/etc/init.d/courier-pop stop"
   if failed port 110 protocol pop then restart
   if 5 restarts within 5 cycles then timeout

## courier_pop3d-ssl
#check process pop3-ssl with pidfile /var/run/courier/pop3d-ssl.pid
#group services
#start program = "/etc/init.d/courier-pop-ssl start"
#stop program = "/etc/init.d/courier-pop-ssl stop"
#if failed port 995 then restart
#if 5 restarts within 5 cycles then timeout

I have already prepared the ssl mode of imapd and popd because i think ispcp will support it in the future ( or i write some how to Wink )
(This post was last modified: 06-27-2007 01:44 AM by tioan.)
06-27-2007 12:51 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #12
RE: [How-to] Configure MONIT to monitorize your server
Fine!
Quote:I have already prepared the ssl mode of imapd and popd because i think ispcp will support it in the future ( or i write some how to )
There is already one in the Wiki --> http://www.isp-control.net/ispcp/wiki/howto_secure
06-27-2007 01:06 AM
Visit this user's website Find all posts by this user Quote this message in a reply
tioan Offline
Junior Member
*

Posts: 22
Joined: Dec 2006
Reputation: 0
Post: #13
RE: [How-to] Configure MONIT to monitorize your server
BeNe Wrote:Fine!
Quote:I have already prepared the ssl mode of imapd and popd because i think ispcp will support it in the future ( or i write some how to )
There is already one in the Wiki --> http://www.isp-control.net/ispcp/wiki/howto_secure

Okay great. I work on config for clamd amavis and so on. i post it later.
06-27-2007 01:09 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #14
RE: [How-to] Configure MONIT to monitorize your server
Quote:Okay great. I work on config for clamd amavis and so on. i post it later.

Do you mean a AntiSpam system like Maia ? --> http://www.isp-control.net/ispcp/wiki/maia
06-27-2007 01:11 AM
Visit this user's website Find all posts by this user Quote this message in a reply
tioan Offline
Junior Member
*

Posts: 22
Joined: Dec 2006
Reputation: 0
Post: #15
RE: [How-to] Configure MONIT to monitorize your server
BeNe Wrote:
Quote:Okay great. I work on config for clamd amavis and so on. i post it later.

Do you mean a AntiSpam system like Maia ? --> http://www.isp-control.net/ispcp/wiki/maia

yes monitoring of clamv freshclam spamasing monit ....
06-27-2007 01:17 AM
Visit this user's website Find all posts by this user Quote this message in a reply
tioan Offline
Junior Member
*

Posts: 22
Joined: Dec 2006
Reputation: 0
Post: #16
RE: [How-to] Configure MONIT to monitorize your server
Some new mixed monitoring stuff

Code:
# amavis
check process amavisd with pidfile /var/run/amavis/amavisd.pid
   group services
   start program = "/etc/init.d/amavis start"
   stop  program = "/etc/init.d/amavis stop"
   if failed port 10024 then restart
   if 5 restarts within 5 cycles then timeout

# clamav-daemon
check process clamd with pidfile o/var/run/clamav/clamd.pid[align=center]
   group services
   start program = "/etc/init.d/clamav-daemon start"
   stop  program = "/etc/init.d/clamav-daemon stop"
   if 5 restarts within 5 cycles then timeout

# clamav-freshclam
check process  freshclam with pidfile /var/run/clamav/freshclam.pid
   group services
   start program = "/etc/init.d/clamav-freshclam start"
   stop  program = "/etc/init.d/clamav-freshclam stop"
   if 5 restarts within 5 cycles then timeout

# cron
check process cron with pidfile /var/run/crond.pid
   group services
   start program = "/etc/init.d/cron start"
   stop  program = "/etc/init.d/cron stop"
   if 5 restarts within 5 cycles then timeout

# munin-node
check process munin-node with pidfile /var/run/munin/munin-node.pid
   group services
   start program = "/etc/init.d/munin-node start"
   stop  program = "/etc/init.d/munin-node stop"
   if 5 restarts within 5 cycles then timeout

# Syslogd
check process syslogd with pidfile /var/run/syslogd.pid
   start program = "/etc/init.d/sysklogd start"
   stop program = "/etc/init.d/sysklogd stop"
   if 5 restarts within 5 cycles then timeout
check file syslogd_file with path /var/log/syslog
   if timestamp > 65 minutes then alert # Have you seen "-- MARK --
or if you use syslog-ng instead of of syslogd
Code:
# syslog-ng
check process syslog-ng with pidfile /var/run/syslog-ng.pid
   group services
   start program = "/etc/init.d/syslog-ng start"
   stop  program = "/etc/init.d/syslog-ng stop"
   if 5 restarts within 5 cycles then timeout

Have fun with it
Can someone of the dev add it into the trac wiki?
(This post was last modified: 06-27-2007 02:02 AM by tioan.)
06-27-2007 01:31 AM
Visit this user's website Find all posts by this user Quote this message in a reply
tioan Offline
Junior Member
*

Posts: 22
Joined: Dec 2006
Reputation: 0
Post: #17
RE: [How-to] Configure MONIT to monitorize your server
And here some two little script which checks if an packages upgrade from apt is avaible or not

/etc/monit/monitrc
Code:
# aptupgrade_check
check file aptupgrade_check path /tmp/aptupgrade_check
   if failed checksum and
   expect the sum 9bef78b12cd45bf489e1fac427dcf3b6
   then alert
/etc/cron.daily/aptupgrade_check
Code:
#! /bin/sh
#
# cron script to check apt for packages upgrades
#
# Written by Mattheus Happe <mhappe@gmail.com>

export LANG=C

/usr/bin/apt-get update && /usr/bin/apt-get upgrade -s > /tmp/aptupgrade_check

/usr/local/sbin/aptupgrade_reset
Code:
#! /bin/sh
#
# script to check apt for packages upgrades
#
# Written by Mattheus Happe <mhappe@gmail.com>

export LANG=C

echo "Reading package lists...
Building dependency tree...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." > /tmp/aptupgrade_check

then type
Code:
chmod +x /etc/cron.daily/aptupgrade_check &&
chmod +x /etc/cron.daily/aptupgrade_check
After upgrade your packages run /usr/local/sbin/aptupgrade_reset

For the future i will try to change the monit message checksumme failed into " apt upgrade available"

I hope someone will use it^^
(This post was last modified: 06-27-2007 03:14 AM by tioan.)
06-27-2007 03:03 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #18
RE: [How-to] Configure MONIT to monitorize your server
Great Stuff - why don´t you post it in the Wiki ?
06-27-2007 03:58 AM
Visit this user's website Find all posts by this user Quote this message in a reply
tioan Offline
Junior Member
*

Posts: 22
Joined: Dec 2006
Reputation: 0
Post: #19
RE: [How-to] Configure MONIT to monitorize your server
BeNe Wrote:Great Stuff - why don´t you post it in the Wiki ?

How i can get an wiki account?
06-27-2007 03:59 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #20
RE: [How-to] Configure MONIT to monitorize your server
Everybody can write in the Wiki - you need no Account --> Feel free to edit our manuals.
06-27-2007 04:02 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)