Nagios graphs and Perfdata

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
pmfunder
Posts: 19
Joined: Wed Jul 25, 2012 9:31 am

Nagios graphs and Perfdata

Post by pmfunder »

Hey Guys,

I just got perfdata working so I'm logging 3 server loads. The /var/service-perfdata file is looking good. I've changed the format around a little as well.

I've been having trouble trying to process the perfdata files. I've tried using process-service-perfdata-file-bulk and process-service-perfdata-file-pnp-bulk. No files seem to be stored in /var/spool/perfdata or /var/spool/xidpe. I changed the processing interval to 5 seconds, and I can see the file in spool/perfdata temporarily show up and then disappear. Regardless, the var/service-perfdata file grows continuously.

Also, my performance graphs on XI have stopped logging data. They started working last Friday for a couple of hours and have not logged data since. I'm not sure what is the cause. Are these two issues related? Any ideas on either of these issues?

Nagios.cfg performance data settings:
-----------------------------

Code: Select all

# PNP settings - bulk mode with NCPD
process_performance_data=1

# service performance data
service_perfdata_file=/usr/local/nagios/var/service-perfdata
service_perfdata_file_template=$SHORTDATETIME$\t$HOSTNAME$\$SERVICEDESC$\tData:$SERVICEPERFDATA$\nCommand:$SERVICECHECKCOMMAND$\tState:$HOSTSTATE$\tStateType:$HOSTSTATETYPE$\tServiceState:$SERVICESTATE$\tServiceStateType:$SERVICESTATETYPE$\tOutput:$SERVICEOUTPUT$\n
service_perfdata_file_mode=a
service_perfdata_file_processing_interval= 30 
service_perfdata_file_processing_command= process-service-perfdata-file-pnp-bulk

#host performance data
host_perfdata_file=/usr/local/nagios/var/host-perfdata
host_perfdata_file_template=$SHORTDATETIME$\t$HOSTNAME$\tHostPerfData:$HOSTPERFDATA$\tCommand:$HOSTCHECKCOMMAND$\nState:$HOSTSTATE$\tStateType:$HOSTSTATETYPE$\tOutput:$HOSTOUTPUT$\n
host_perfdata_file_mode=a
host_perfdata_file_processing_interval= 30
host_perfdata_file_processing_command=process-host-perfdata-file-pnp-bulk
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios graphs and Perfdata

Post by scottwilkerson »

The default setup should be

Code: Select all

# PNP settings - bulk mode with NCPD
process_performance_data=1
# service performance data
service_perfdata_file=/usr/local/nagios/var/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$\tSERVICEOUTPUT::$SERVICEOUTPUT$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file-bulk
# host performance data
host_perfdata_file=/usr/local/nagios/var/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tHOSTOUTPUT::$HOSTOUTPUT$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file-bulk
What you have in here also is some different templates as usual.

Were you trying to make some modifications before this started??
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
pmfunder
Posts: 19
Joined: Wed Jul 25, 2012 9:31 am

Re: Nagios graphs and Perfdata

Post by pmfunder »

The performance file data processing has never worked properly (the files disappear).

For the graphs, on Friday I was doing some modifications to get the performance data files to work. If the graphs are dependent on the performance data files it is possible that I could have changed something. Which config files should I observe to understand why the graphs aren't plotting?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Nagios graphs and Perfdata

Post by scottwilkerson »

pmfunder wrote:The performance file data processing has never worked properly (the files disappear).
It is supposed to disappear. Once the data is read into the system it is removed. there are several files that just store temp data and then are removed when they are reaped.

The config above is what the default working setup should be. Once you change the nagios.cfg you need to restart nagios for the changes to take affect.

I should mention that this configuration also assumes you didn't change the command definitions for the following commands
process-service-perfdata-file-bulk
process-host-perfdata-file-bulk
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
pmfunder
Posts: 19
Joined: Wed Jul 25, 2012 9:31 am

Re: Nagios graphs and Perfdata

Post by pmfunder »

Thanks Scott,

I'm going to change my configuration back to the default and see if the graphs will continue to work. Can you clarify a few things based on our discussion:

1.So the graphs are dependent on performance data? i.e. If I only enable service performance data for particular services, does that mean that only those graphs will get populated?
2.Also, if you enable service data processing, should your service-perfdata and host-perfdata files be cleared at each interval? Mine seem to be growing regardless of the processing interval.
3. If we wanted to access data that is reaped, where could we find this (mysql database?)

Thanks
Phil
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios graphs and Perfdata

Post by slansing »

1. Yes, the graphs are dependent on the RRD files.

2. If the files are continuing to grow and not disappear there is something going wrong with the processing, any word back on setting everything back to defaults?

3. RRD files and .xml's are located in the:

Code: Select all

/usr/local/nagios/share/perfdata
directory.
pmfunder
Posts: 19
Joined: Wed Jul 25, 2012 9:31 am

Re: Nagios graphs and Perfdata

Post by pmfunder »

Thanks Slansing,

I reset the nagios.cfg perfdata file options to the defaults you posted and the graphs are working now.

Thanks for clarifying the rrd files. I just looked up how to view data from them as well and this seems to work.

Regards,
Phil