1. Install pnp4 nagios
yum install pnp4nagios
2. Setup /etc/nagios/nagios.cfg
process_performance_data=1 host_perfdata_command=process-host-perfdata service_perfdata_command=process-service-perfdata
3. Setup /etc/nagios/objects/commands.cfg to send performance data to pnp4nagios.
define command{ command_name process-host-perfdata command_line /usr/bin/perl /usr/libexec/pnp4nagios/process_perfdata.pl -d HOSTPERFDATA } define command{ command_name process-service-perfdata command_line /usr/bin/perl /usr/libexec/pnp4nagios/process_perfdata.pl }
4. Setup: /etc/nagios/objects/yourserver.cfg
define host { name host-pnp action_url /nagios/pnp4nagios/index.php?host=$HOSTNAME$&srv=_HOST_ register 0 } define service { name srv-pnp action_url /nagios/pnp4nagios/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$ register 0 } # a service using pnp define service { use generic-service,srv-pnp hostgroup_name generic-hosts service_description Memory check_command check_nrpe!check_mem }
5. Restart nagios
Official docs here.
No comments:
Post a Comment