doc:appunti:linux:sa:monit
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
doc:appunti:linux:sa:monit [2012/10/22 11:34] – created 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 54: | Line 79: | ||
set daemon 120 # check services at 2-minute intervals | set daemon 120 # check services at 2-minute intervals | ||
with start delay 240 # optional: delay the first check by 4-minutes (by | with start delay 240 # optional: delay the first check by 4-minutes (by | ||
+ | |||
+ | set mailserver localhost | ||
+ | | ||
+ | set mail-format { from: sistema@texnet.it } # Set custom From: mail header | ||
+ | |||
+ | set alert support@texnet.it | ||
set httpd port 2812 and | set httpd port 2812 and | ||
use address 62.48.51.60 | use address 62.48.51.60 | ||
- | allow 62.48.51.8 | + | |
+ | | ||
allow admin: | allow admin: | ||
allow @monit | allow @monit | ||
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