Monitorare un server con Munin e Monit: differenze tra le versioni

Riga 168: Riga 168:
   if failed port 25 protocol smtp then restart
   if failed port 25 protocol smtp then restart
   if 5 restarts within 5 cycles then timeout
   if 5 restarts within 5 cycles then timeout
check process munin-node with pidfile /var/run/munin/munin-node.pid
    group system
    start program = "/etc/init.d/munin-node start"
    stop program  = "/etc/init.d/munin-node stop"
    if failed host localhost port 4949 then restart
    if 5 restarts within 5 cycles then timeout


#check process nginx with pidfile /var/run/nginx.pid
#check process nginx with pidfile /var/run/nginx.pid
Riga 244: Riga 251:
#  if failed host localhost port 993 type tcpssl sslauto protocol imap then restart
#  if failed host localhost port 993 type tcpssl sslauto protocol imap then restart
#  if 5 restarts within 5 cycles then timeout
#  if 5 restarts within 5 cycles then timeout
#
#check process clamav 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 host localhost port 3310 then restart
#    if 5 restarts within 5 cycles then timeout
#
#check process freshclam with pidfile /var/run/clamav/freshclam.pid
#    group virus
#    start program = "/etc/init.d/clamav-freshclam start"
#    stop  program = "/etc/init.d/clamav-freshclam stop"
#    if 5 restarts within 5 cycles then timeout
#
#check process cron with pidfile /var/run/crond.pid
#    group system
#    start program = "/etc/init.d/cron start"
#    stop  program = "/etc/init.d/cron stop"
#    if 5 restarts within 5 cycles then timeout
#
#check process dspam with pidfile /var/run/dspam/dspam.pid
#    group mail
#    start program = "/etc/init.d/dspam start"
#    stop program = "/etc/init.d/dspam stop"
#    if 5 restarts within 5 cycles then timeout
#
#check process fail2ban with pidfile /var/run/fail2ban/fail2ban.pid
#    start program = "/etc/init.d/fail2ban start"
#    stop  program = "/etc/init.d/fail2ban stop"
#    if failed unixsocket /var/run/fail2ban/fail2ban.sock then restart
#    if 5 restarts within 5 cycles then timeout
#
#check process vsftpd with pidfile /var/run/vsftpd/vsftpd.pid
#    start program = "/etc/init.d/vsftpd start"
#    stop program  = "/etc/init.d/vsftpd stop"
#    if failed port 21 protocol ftp then restart
#    if 5 restarts within 5 cycles then timeout
</pre>
</pre>
Nella configurazione sono stati lasciati, commentati, anche i parametri per monitorare servizi diversi da quelli impostati nel nostro caso specifico.
Nella configurazione sono stati lasciati, commentati, anche i parametri per monitorare servizi diversi da quelli impostati nel nostro caso specifico.