6661928
* Default Mode
6661928
6661928
/etc/nagios/nagios.cfg
6661928
6661928
 process_performance_data=1
6661928
 service_perfdata_command=process-service-perfdata
6661928
6661928
/etc/nagios/commands.cfg
6661928
6661928
define command {
6661928
  command_name    process-service-perfdata
6661928
  command_line    /usr/bin/perl /usr/libexec/pnp4nagios/process_perfdata.pl
6661928
}
6661928
6661928
define command {
6661928
  command_name    process-host-perfdata
6661928
  command_line    /usr/bin/perl /usr/libexec/pnp4nagios/process_perfdata.pl -d HOSTPERFDATA
6661928
}
6661928
6661928
6661928
* Bulk Mode
6661928
6661928
/etc/nagios/nagios.cfg :
6661928
6661928
process_performance_data=1
6661928
#
6661928
# service performance data
6661928
#
6661928
service_perfdata_file=/var/spool/nagios/service-perfdata
6661928
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
6661928
service_perfdata_file_mode=a
6661928
service_perfdata_file_processing_interval=15
6661928
service_perfdata_file_processing_command=process-service-perfdata-file
6661928
6661928
/etc/nagios/commands.cfg :
6661928
6661928
define command{
6661928
        command_name    process-service-perfdata-file
6661928
        command_line    $USER1$/process_perfdata.pl --bulk=/var/spool/nagios/service-perfdata
6661928
 }
6661928
6661928
define command{
6661928
        command_name    process-host-perfdata-file
6661928
        command_line    $USER1$/process_perfdata.pl --bulk=/var/spool/nagios/host-perfdata
6661928
 }
6661928
6661928
6661928
* Bulk Mode with NPCD
6661928
6661928
npcd daemon needs to be started :
6661928
service npcd start
6661928
chkconfig npcd on
6661928
2ef28e9
The configuration is identical to the bulk mode except for the used command.
6661928
6661928
/etc/nagios/commands.cfg :
6661928
6661928
define command{
6661928
        command_name    process-service-perfdata-file
6661928
        command_line    /bin/mv /var/spool/nagios/service-perfdata /var/spool/pnp4nagios/service-perfdata.$TIMET$
6661928
 }
6661928
6661928
define command{
6661928
        command_name    process-host-perfdata-file
6661928
        command_line    /bin/mv /var/spool/nagios/host-perfdata /var/spool/pnp4nagios/service-perfdata.$TIMET$
6661928
 }
6661928
6661928
6661928
* Nagios integration
6661928
6661928
/etc/nagios/hostextinfo.cfg :
6661928
6661928
define hostextinfo {
6661928
    host_name localhost
Jan ONDREJ (SAL) 0850017
    action_url /pnp4nagios/graph?host=$HOSTNAME$
6661928
    }