doc:appunti:linux:sa:monit
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
doc:appunti:linux:sa:monit [2013/03/29 17:46] – [Configurazione di monit] niccolo | doc:appunti:linux:sa:monit [2016/03/22 12:00] – [Configurazione di monit] niccolo | ||
---|---|---|---|
Line 26: | Line 26: | ||
check process spamd with pidfile / | check process spamd with pidfile / | ||
group spamd | group spamd | ||
- | start program = "/ | + | start program = "/ |
| | ||
if 5 restarts within 5 cycles then timeout | if 5 restarts within 5 cycles then timeout | ||
Line 48: | Line 48: | ||
if failed gid root then unmonitor | if failed gid root then unmonitor | ||
</ | </ | ||
+ | |||
+ | **Attenzione: | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | [CET Mar 28 16:53:40] info : ' | ||
+ | [CET Mar 28 16:54:11] error : ' | ||
+ | [CET Mar 28 16:56:11] error : ' | ||
+ | [CET Mar 28 16:56:11] info : ' | ||
+ | [CET Mar 28 16:56:11] info : ' | ||
+ | [CET Mar 28 16:56:43] error : ' | ||
+ | [CET Mar 28 16:58:43] error : ' | ||
+ | </ | ||
+ | |||
+ | Ecco quindi una configurazione che insiste più a lungo per riavviare il servizio e che esegue una azione drastica (**'' | ||
+ | |||
+ | < | ||
+ | ... | ||
+ | start program = "/ | ||
+ | | ||
+ | if 4 restarts within 4 cycles then exec "/ | ||
+ | if 10 restarts within 10 cycles then timeout | ||
+ | ... | ||
+ | </ | ||
+ | |||
Poi alcuni parametri sono stati aggiustati in **''/ | Poi alcuni parametri sono stati aggiustati in **''/ | ||
Line 56: | Line 81: | ||
set mailserver localhost | set mailserver localhost | ||
+ | | ||
+ | set mail-format { from: sistema@texnet.it } # Set custom From: mail header | ||
- | set alert support@texnet.it | + | set alert support@texnet.it |
set httpd port 2812 and | set httpd port 2812 and | ||
Line 67: | Line 94: | ||
allow @users readonly | allow @users readonly | ||
</ | </ | ||
+ | |||
+ | ===== Interruzione del monitoraggio ===== | ||
+ | |||
+ | Se un processo monitorato si blocca, viene tentato il suo riavvio. Potrebbe capitare che il processo non riesca a partire nei tempi previsti, ad esempio '' | ||
+ | |||
+ | < | ||
+ | spamd[8042]: | ||
+ | </ | ||
+ | |||
+ | In tal caso il processo non viene più sottoposto a monitoraggio, | ||
+ | |||
+ | < | ||
+ | monit monitor spamd | ||
+ | </ | ||
+ | |||
+ | Questo comando funziona solo se è stata attivata la funzione integrata di server http (vedi configurazione '' |
doc/appunti/linux/sa/monit.txt · Last modified: 2016/04/26 09:22 by niccolo