|
|
# Installation Nagios
|
|
|
[[_TOC_]]
|
|
|
## Nagios Core
|
|
|
### Hostgroup definition
|
|
|
### Service definition
|
|
|
## NRPE (Active Polling of local data)
|
|
|
### On the monitoring server
|
|
|
# apt-get install nagios-nrpe-plugin
|
|
|
### On the monitored client
|
|
|
# apt-get install nagios-nrpe-server nagios-plugins
|
|
|
# nano /etc/nagios/nrpe/nrpe.cfg
|
|
|
[replace allowed_hosts=127.0.0.1,$IP_NAGIOS_SERVER]
|
|
|
[copy inubo/commun/realisation/itopie/nagios/itopie.cfg in /etc/nagios/nrpe.d]
|
|
|
#service nagios-nrpe-server restart
|
|
|
|
|
|
### Service definition example
|
|
|
Define service in (nagios server) /srv/nagios3/conf.d/global/
|
|
|
|
|
|
define service{
|
|
|
use tmpl-service-generic
|
|
|
hostgroup_name HOSTGROUP_SMB
|
|
|
service_description Disk check /
|
|
|
check_command check_nrpe_1arg!check_disk_root
|
|
|
}
|
|
|
|
|
|
### Command definition example
|
|
|
Define command in (monitored node) /etc/nagios/nrpe/nrpd.d/itopie.cfg
|
|
|
|
|
|
command[check_disk_root]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p / |