doc:appunti:linux:sa:nagios_passivo
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:linux:sa:nagios_passivo [2010/08/19 06:30] – niccolo | doc:appunti:linux:sa:nagios_passivo [2014/01/31 16:39] (current) – [Configurazione del server (Nagios)] niccolo | ||
---|---|---|---|
Line 6: | Line 6: | ||
Per questo occorre installare **NSCA** (Nagios Service Check Acceptor), che funziona in architettura client-server, | Per questo occorre installare **NSCA** (Nagios Service Check Acceptor), che funziona in architettura client-server, | ||
+ | |||
+ | L' | ||
===== Configurazione del server (Nagios) ===== | ===== Configurazione del server (Nagios) ===== | ||
- | In Debian troviamo | + | In Debian |
La comunicazione tra client e server avviene in chiaro e senza password, se si vuole qualcosa di meglio editare il file ''/ | La comunicazione tra client e server avviene in chiaro e senza password, se si vuole qualcosa di meglio editare il file ''/ | ||
Line 20: | Line 22: | ||
name passive-service | name passive-service | ||
; referenced in other service definitions | ; referenced in other service definitions | ||
- | active_checks_enabled | + | active_checks_enabled |
passive_checks_enabled | passive_checks_enabled | ||
parallelize_check | parallelize_check | ||
- | ; (disabling this can lead to major performance | + | ; (disabling this can lead to major performance |
obsess_over_service | obsess_over_service | ||
check_freshness | check_freshness | ||
- | freshness_threshold | + | freshness_threshold |
notifications_enabled | notifications_enabled | ||
event_handler_enabled | event_handler_enabled | ||
Line 33: | Line 35: | ||
retain_status_information | retain_status_information | ||
retain_nonstatus_information | retain_nonstatus_information | ||
+ | notification_interval | ||
+ | is_volatile | ||
+ | check_period | ||
normal_check_interval | normal_check_interval | ||
retry_check_interval | retry_check_interval | ||
max_check_attempts | max_check_attempts | ||
+ | notification_period | ||
+ | notification_options | ||
+ | contact_groups | ||
register | register | ||
; JUST A TEMPLATE! | ; JUST A TEMPLATE! | ||
Line 52: | Line 60: | ||
name bacula-service | name bacula-service | ||
use | use | ||
- | freshness_threshold | + | freshness_threshold |
+ | max_check_attempts | ||
check_command | check_command | ||
+ | notification_interval | ||
register | register | ||
} | } | ||
</ | </ | ||
+ | |||
+ | Due parametri i fondamentali da configurare. Il primo è **freshness_threshold**: | ||
Poi si aggiunge un finto host, che serve solo per raggruppare tutti i backup monitorati. Si può creare il file **''/ | Poi si aggiunge un finto host, che serve solo per raggruppare tutti i backup monitorati. Si può creare il file **''/ | ||
Line 70: | Line 82: | ||
use | use | ||
check_command | check_command | ||
- | max_check_attempts | ||
notification_interval | notification_interval | ||
notification_period | notification_period | ||
Line 90: | Line 101: | ||
</ | </ | ||
- | Quando Nagios è in esecuzione | + | Quando Nagios è in esecuzione |
+ | < | ||
+ | check_external_commands=1 | ||
+ | command_check_interval=10 | ||
+ | </ | ||
+ | |||
+ | Se la pipe non esiste i comandi vengono accodati al file **''/ | ||
+ | |||
+ | ===== Problema di versione ===== | ||
+ | |||
+ | Attenzione alla **versione del client e del server nsca**! Debian Squeeze (nsca 2.7.2) e Debian Wheezy (nsca 2.9.1) non sono compatibili, | ||
+ | |||
+ | < | ||
+ | Dropping packet with invalid CRC32 - possibly due to client using wrong password or crypto algorithm? | ||
+ | </ | ||
+ | |||
+ | più comprensibile se la crittografia è disabilitata: | ||
+ | |||
+ | < | ||
+ | Received invalid packet type/ | ||
+ | </ | ||
+ | |||
+ | Per fortuna si trova il backport del pacchetto per Debian Squeeze. | ||
===== Configurazione del client (Bacula) ===== | ===== Configurazione del client (Bacula) ===== | ||
- | Installare il cient che consiste essenzialmente nel programma **'' | + | Installare il cient che consiste essenzialmente nel programma **'' |
+ | |||
+ | Predisporre uno script del tipo (**ATTENZIONE** il separatore per il file da dare in input a send_nsca è il TAB): | ||
<code bash> | <code bash> | ||
Line 114: | Line 149: | ||
send_nsca -H 172.16.237.211 -c / | send_nsca -H 172.16.237.211 -c / | ||
- | BACKUPS | + | Bacula_backups |
END | END | ||
</ | </ |
doc/appunti/linux/sa/nagios_passivo.txt · Last modified: 2014/01/31 16:39 by niccolo