doc:appunti:linux:sa:cacti_122
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
doc:appunti:linux:sa:cacti_122 [2019/09/06 16:06] – [VirtualHost con SSL] niccolo | doc:appunti:linux:sa:cacti_122 [2020/06/08 19:06] – [Modifica servizi predefiniti] niccolo | ||
---|---|---|---|
Line 294: | Line 294: | ||
</ | </ | ||
+ | ==== CheckCommand con parametri opzionali ==== | ||
+ | |||
+ | Si è avuto un caso particolare in cui il **server NRPE versione 2.15** (in esecuzione sull' | ||
+ | |||
+ | < | ||
+ | nrpe[9169]: Error: Could not complete SSL handshake. | ||
+ | </ | ||
+ | |||
+ | È stato necessario avviare il server NRPE con l' | ||
+ | |||
+ | < | ||
+ | object CheckCommand " | ||
+ | command = [ PluginDir + "/ | ||
+ | arguments = { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | È sufficiente definire la variabile opportuna nella sezione host: | ||
+ | |||
+ | < | ||
+ | object Host " | ||
+ | import " | ||
+ | address = " | ||
+ | vars.nrpe_swraid = " | ||
+ | vars.nrpe_no_ssl = true | ||
+ | } | ||
+ | </ | ||
===== Check passivo ===== | ===== Check passivo ===== | ||
Line 515: | Line 546: | ||
} | } | ||
</ | </ | ||
+ | ===== Notifica custom su Host ===== | ||
+ | |||
+ | Vediamo come predisporre le notifiche per un singolo host inviando una mail ad un determinato indirizzo. Si crea un file (ad esempio **/ | ||
+ | |||
+ | < | ||
+ | apply Notification " | ||
+ | import " | ||
+ | users = host.vars.notification.mailcustomer.users | ||
+ | times.begin = 3h | ||
+ | interval = 12h | ||
+ | assign where host.vars.notification.mailcustomer | ||
+ | } | ||
+ | |||
+ | object User " | ||
+ | import " | ||
+ | display_name = "Alert for ADSL 1" | ||
+ | email = " | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Le notifiche inizieranno solo **dopo 3 ore** che l'host ha il problema, e verranno ripetute **ogni 12 ore**. Quindi è sufficiente aggiungere una riga alla definizione dell' | ||
+ | |||
+ | < | ||
+ | object Host " | ||
+ | import " | ||
+ | address = " | ||
+ | vars.notification.mailcustomer = { users = [ " | ||
+ | } | ||
+ | </ | ||
+ | |||
===== Modifica servizi predefiniti ===== | ===== Modifica servizi predefiniti ===== | ||
doc/appunti/linux/sa/cacti_122.txt · Last modified: 2022/10/10 16:27 by niccolo