Nagios : Add Monitoring Target Host#22016/01/17 |
It's possible to monitor other servers on the network not only
with simply Ping command but services on them.
|
|
[1] | Install nrpe on a target host you'd like to monitor services on it. |
root@node01:~#
apt-get -y install nagios-nrpe-server
root@node01:~#
vi /etc/nagios/nrpe.cfg # line 81: add access permission (specify Nagios server) allowed_hosts=127.0.0.1 ,10.0.0.30
# line 97: permit arguments of commands dont_blame_nrpe= 1
# line 219: comment out all # command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10# command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20# command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1# command[check_zombie_procs]=/usr/lib/nagios/plugins/check_procs -w 5 -c 10 -sZ# command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200
# line 232: uncomment all command[check_users]=/usr/lib/nagios/plugins/check_users -w $ARG1$ -c $ARG2$ command[check_load]=/usr/lib/nagios/plugins/check_load -w $ARG1$ -c $ARG2$ command[check_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ command[check_procs]=/usr/lib/nagios/plugins/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$ /etc/init.d/nagios-nrpe-server restart |
[2] | Configure Nagios server. |
root@dlp:~#
apt-get -y install nagios-nrpe-plugin
root@dlp:~#
vi /etc/nagios3/conf.d/node01.cfg # create new define host{ use generic-host host_name node01 alias node01 address 10.0.0.51 } define service{ use generic-service host_name node01 service_description PING check_command check_ping!100.0,20%!500.0,60% } # for free disk define service{ use generic-service host_name node01 service_description Root Partition check_command check_nrpe_1arg!check_disk\!20%\!10%\!/ } # for current users define service{ use generic-service host_name node01 service_description Current Users check_command check_nrpe_1arg!check_users\!20\!50 } # for total processes define service{ use generic-service host_name node01 service_description Total Processes check_command check_nrpe_1arg!check_procs\!250\!400\!RSZDT } # for current load define service{ use generic-service host_name node01 service_description Current Load check_command check_nrpe_1arg!check_load\!5.0,4.0,3.0\!10.0,6.0,4.0 } /etc/init.d/nagios3 restart |
[3] | It's possible to view the status for a new server on the admin site. |
Sponsored Link |