#1  
Old 18th November 2010, 02:11
wiss wiss is offline
Member
 
Join Date: Oct 2010
Posts: 69
Thanks: 3
Thanked 4 Times in 4 Posts
Default Monitoring server Ubuntu

Hy.

Im installed Perfect Ubuntu server 10.04 with ispconfig 3.03, and works fine.

I would like to monitor all services and logs and receive emails when anithyng works bad.

Im too have a postgresql server running in this machine and clustering with bucardo.


What recommend me?

thank you in advance.
__________________
Reparacion ordenadores | Reparacion portatiles
Pd: Sorry for my english...
Reply With Quote
Sponsored Links
  #2  
Old 18th November 2010, 13:08
itsnedkeren itsnedkeren is offline
Senior Member
 
Join Date: May 2009
Location: Denmark
Posts: 128
Thanks: 32
Thanked 10 Times in 10 Posts
Default

Try this:

http://www.howtoforge.com/server-mon...n-debian-lenny

Should work also for Ubuntu.
__________________
Best regards

Jim
Reply With Quote
The Following User Says Thank You to itsnedkeren For This Useful Post:
wiss (18th November 2010)
  #3  
Old 18th November 2010, 13:42
wiss wiss is offline
Member
 
Join Date: Oct 2010
Posts: 69
Thanks: 3
Thanked 4 Times in 4 Posts
Default

Thx itsnedkeren.

But this is only monitoring, not sen mail when anything fails... no?

Y read for nagios, what do you think?

Thx in advance.
__________________
Reparacion ordenadores | Reparacion portatiles
Pd: Sorry for my english...
Reply With Quote
  #4  
Old 18th November 2010, 13:54
itsnedkeren itsnedkeren is offline
Senior Member
 
Join Date: May 2009
Location: Denmark
Posts: 128
Thanks: 32
Thanked 10 Times in 10 Posts
Default

Monit will send mails if the configured service fails. I'm using it my self, and it's very effective.

NagiOS is enterprise scale monitoring, which you would require a standalone server to run.
__________________
Best regards

Jim
Reply With Quote
The Following User Says Thank You to itsnedkeren For This Useful Post:
wiss (18th November 2010)
  #5  
Old 18th November 2010, 13:58
wiss wiss is offline
Member
 
Join Date: Oct 2010
Posts: 69
Thanks: 3
Thanked 4 Times in 4 Posts
Default

Txh.

Monit works with postgre?

Thx.
__________________
Reparacion ordenadores | Reparacion portatiles
Pd: Sorry for my english...
Reply With Quote
  #6  
Old 18th November 2010, 14:25
itsnedkeren itsnedkeren is offline
Senior Member
 
Join Date: May 2009
Location: Denmark
Posts: 128
Thanks: 32
Thanked 10 Times in 10 Posts
Default

Quote:
Originally Posted by wiss View Post
Txh.

Monit works with postgre?

Thx.

http://mmonit.com/wiki/Monit/PostgreSQL
__________________
Best regards

Jim
Reply With Quote
  #7  
Old 19th November 2010, 13:41
wiss wiss is offline
Member
 
Join Date: Oct 2010
Posts: 69
Thanks: 3
Thanked 4 Times in 4 Posts
Default

Thx so much.

I've try it now.
__________________
Reparacion ordenadores | Reparacion portatiles
Pd: Sorry for my english...
Reply With Quote
  #8  
Old 20th November 2010, 13:56
wiss wiss is offline
Member
 
Join Date: Oct 2010
Posts: 69
Thanks: 3
Thanked 4 Times in 4 Posts
 
Default

Hy!!!!

I follow the tutorial and it works very well.

Here is my monitrc.

Machine: OpenVZ ubuntu server 10.04 PERFECT SERVER ISPCONFIG 3.

Code:
set daemon  60
set logfile syslog facility log_daemon
set mailserver smtp.gmail.com port 587 username "xxx@gmail.com" password "xxxx" using tlsv1 with timeout 30 seconds
set mail-format {
   from: xxxxxx@gmail.com
   subject: $SERVICE el $DATE
   message:
 
            Monit: $ACTION $SERVICE
	    Fecha: $DATE
	    Descripción: $DESCRIPTION.

           	SERVIDOR $HOST
           Powered by: monit
}
set alert xxxx@gmail.com only on { action
                      checksum
                      content
                      data
                      exec
                      gid
                      icmp
                      invalid
                      fsflags
                      nonexist
                      permission
                      size
                      timeout
                      timestamp }



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


# amavis
check process amavisd with pidfile /var/run/amavis/amavisd.pid
   group mail
   start program = "/etc/init.d/amavis start"
   stop  program = "/etc/init.d/amavis stop"
   if failed port 10024 protocol smtp then restart
   if 5 restarts within 5 cycles then timeout
   depends on amavisd_bin
   depends on amavisd_rc

check file amavisd_bin with path  /usr/sbin/amavisd-new
   group mail
   if failed checksum then unmonitor
   if failed permission 755 then unmonitor
   if failed uid root then unmonitor
   if failed gid root then unmonitor

check file amavisd_rc with path /etc/init.d/amavis
   group mail
   if failed checksum then unmonitor
   if failed permission 755 then unmonitor
   if failed uid root then unmonitor
   if failed gid root then unmonitor

# Apache2
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 port 80 protocol http then restart
   if cpu is greater than 60% for 2 cycles then alert
   if cpu > 80% for 5 cycles then restart
   if totalmem > 1500 MB for 5 cycles then restart
   if children > 512 then restart
   if loadavg(5min) greater than 10 for 8 cycles then stop
   if 3 restarts within 5 cycles then timeout

# 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

# Cron
check process cron with pidfile /var/run/crond.pid
   start program = "/etc/init.d/cron start"
   stop  program = "/etc/init.d/cron stop"
   group system
   depends cron_init, cron_bin

check file cron_init with path /etc/init.d/cron
   group system

check file cron_bin with path /usr/sbin/cron
   group system

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

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

# Courier_immapd-ssl
check process imapd-ssl with pidfile /var/run/courier/imapd-ssl.pid
   group mail
   start program = "/etc/init.d/courier-imap-ssl start"
   stop  program = "/etc/init.d/courier-imap-ssl stop"
   if failed port 143 then restart
   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

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

# Courier_pop3-ssl
check process pop3-ssl with pidfile /var/run/courier/pop3d-ssl.pid
   group mail
   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

#PureFTPd
check process pure-ftpd with pidfile /var/run/pure-ftpd/pure-ftpd.pid
   start program  "/etc/init.d/pure-ftpd-mysql start"
   stop program  "/etc/init.d/pure-ftpd-mysql stop"
   if failed host 127.0.0.1 port 21 then restart
   if 5 restarts within 5 cycles then timeout

# Spamassassin
check process spamd with pidfile /var/run/spamd.pid
   group mail
   start program = "/etc/init.d/spamassassin start"
   stop  program = "/etc/init.d/spamassassin stop"
   if 5 restarts within 5 cycles then timeout
   if cpu usage > 99% for 5 cycles then alert
   if mem usage > 99% for 5 cycles then alert

check file spamd_bin with path /usr/sbin/spamd
   group mail
   if failed checksum then unmonitor
   if failed permission 755 then unmonitor
   if failed uid root then unmonitor
   if failed gid root then unmonitor

 check file spamd_rc with path /etc/init.d/spamassassin
   group mail
   if failed checksum then unmonitor
   if failed permission 755 then unmonitor
   if failed uid root then unmonitor
   if failed gid root then unmonitor

# Syslog-ng
check process syslogd with pidfile /var/run/syslog-ng.pid
   start program = "/etc/init.d/syslog-ng  start"
   stop program = "/etc/init.d/syslog-ng  stop"
   if 5 restarts within 5 cycles then timeout
   check file syslogd_file with path /var/log/syslog

check process postgresql with pidfile /var/run/postgresql/8.4-main.pid
    group database
    start program = "/etc/init.d/postgresql start"
    stop  program = "/etc/init.d/postgresql stop"
 if failed host localhost port 5432 protocol pgsql then restart
 if failed host localhost port 5432 protocol pgsql then alert
 if 5 restarts within 5 cycles then timeout


check process mysql with pidfile /var/lib/mysql/virt318.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 protocol mysql then restart
   if 5 restarts within 5 cycles then timeout

# Clamd
check process clamd with pidfile /var/run/clamav/clamd.pid
   group virus
   start program = "/etc/init.d/clamav-daemon start"
   stop  program = "/etc/init.d/clamav-daemon stop"
   if failed unixsocket /var/run/clamav/clamd.ctl then restart
   if 5 restarts within 5 cycles then timeout
   depends on clamavd_bin
   depends on clamavd_rc

check file clamavd_bin with path /usr/sbin/clamd
   group virus
   if failed checksum then unmonitor
   if failed permission 755 then unmonitor
   if failed uid root then unmonitor
   if failed gid root then unmonitor

check file clamavd_rc with path /etc/init.d/clamav-daemon
   group virus
   if failed checksum then unmonitor
   if failed permission 755 then unmonitor
   if failed uid root then unmonitor
   if failed gid root then unmonitor
Thats perfect!!!!
__________________
Reparacion ordenadores | Reparacion portatiles
Pd: Sorry for my english...
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
ISPConfig 3 - CentOS 5.4 - SSL Problems!?! owainbaber Installation/Configuration 4 26th July 2011 18:12
Connection timed out on intermail outgoing mails gouravgarg Server Operation 6 5th March 2010 21:31
Problem with mail server and subdomains MyKE General 7 26th February 2010 11:18
ISPConfig3 Mail Warn Errors reason8 General 3 25th November 2009 14:58
subdomain and mail relay configuration aranthorn Installation/Configuration 24 3rd September 2007 23:53


All times are GMT +2. The time now is 11:25.


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