1

I have successfully configured Nagios 3.2.3 to monitor several SNMP Agents.

For instance, I'm monitoring the OID RFC1213-MIB::udpOutDatagrams.0 on one of those agents.

This is working fine. I can get the following information on the current values of an OID (a service in Nagios):

Current Status:   OK   (for 1d 9h 46m 24s)
Status Information: SNMP OK - 55886
Performance Data:   RFC1213-MIB::udpOutDatagrams.0=55886c
Current Attempt:    1/3  (HARD state)
Last Check Time:    06-02-2015 16:17:25
Check Type: ACTIVE
Check Latency / Duration:   0.081 / 5.304 seconds
Next Scheduled Check:   06-02-2015 16:27:25
Last State Change:  06-01-2015 06:37:25
Last Notification:  N/A (notification 0)
Is This Service Flapping?     NO   (0.00% state change)
In Scheduled Downtime?    NO  
Last Update:    06-02-2015 16:23:49  ( 0d 0h 0m 0s ago)

However, I can't seem to figure out how to view previous values.

For instance, I want to find out how many datagrams an agent sent today.

All I can find in the web interface is availability reports.

It would be great if I could generate a report that uses the actual retrieved values.

If this is not possible, I would like to know where I can find the log files, so I can at least retrieve this information one way or the other.

wvdz
  • 241

1 Answers1

0

Nagios will not automatically log these values. You have to enable this manually. Change or add the following parameters in your nagios.cfg:

process_performance_data=1
service_perfdata_file=/var/nagios/perfdata.log
service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=30
service_perfdata_file_processing_command=process-service-perfdata

Verify that your commands.cfg contains the following command:

define command{
    command_name    process-service-perfdata
    command_line    /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /usr/local/nagios/var/service-perfdata.out
}

These settings will enable logging of performance data to the specified file: /var/nagios/perfdata.log

wvdz
  • 241