Getting Performance Data into the perfdata files

Ben Clewett Ben at clewett.org.uk
Fri May 21 18:35:39 CEST 2004


When you configure Nagios, do you get a report like:

  External Data Routines:
  ------------------------
           Peformance data:  File

In the Nagios install directory, in ./common, there is a file config.h. 
  Can you confirm it contain the line:

#define USE_XPDFILE 1

Can you confirm that you are not yet using 'perfparse'?  --  This will 
truncate the log file to size zero.

Permissions again.  Always worth checking.  My files look like:

-rw-rw-r--    1 nagios   nagios      36742 May 21 17:29 hostperf.log
-rw-rw-r--    1 nagios   nagios     106238 May 21 17:29 serviceperf.log

Apart from that, I'll have to think on it...

Ben



Cook, Garry wrote:

> Ben Clewett wrote:
> 
>>If you manually enter a check command, does it display the performance
>>data.  Eg:
> 
> 
> Yes.
> 
> 
>>Find one which you know works and ensure Nagios is checking
>>it.  Note:-
>>The check_load I used for that web site came from
>>nagios-plugins-HEAD-200403290547.tar.gz, which image are you using?
> 
> 
> I used check_load from nagios-plugins-HEAD-200405201647.tar.gz. It works
> fine from the command line, performance data after the pipe and all.
> 
> [garry at netmon1 libexec]$ ./check_load -w 3,3,3 -c 5,5,5
> OK - load average: 0.08, 0.83,
> 1.06|load1=0.080000;3.000000;5.000000;0.000000
> load5=0.830000;3.000000;5.000000;0.000000
> load15=1.060000;3.000000;5.000000;0.000000
> 
> 
>>My own nagios.cfg config file shows:
>>
>>process_performance_data=1
>>xpdfile_host_perfdata_file=/usr/local/nagios/var/hostperf.log
>>xpdfile_host_perfdata_template=$TIMET$\t$HOSTNAME$\t$OUTPUT$\t
>>$PERFDATA$
>>xpdfile_service_perfdata_file=/usr/local/nagios/var/serviceperf.log
>>xpdfile_service_perfdata_template=$TIMET$\t$HOSTNAME$\t$SERVIC
>>EDESC$\t$OUTPUT$\t$PERFDATA$  
>>
>>Do you have something similar?
> 
> 
> I have *exactly* the same entries in nagios.cfg.
> 
> 
>>Finally, the log file.  Please look at the log file (tail -f
>>var/nagios.log) and ensure there are no errors.
> 
> 
> I tail-followed the nagios.log, and forced a check_load on the box. The
> only thing that showed up in the log was the forced check, no errors.
> The forced check returned an OK state to Nagios, but still nothing in
> the perfdata files.
> 
> As the tree said to the lumberjack, I'm stumped.
> 
> 
>>Cook, Garry wrote:
>>
>>
>>>I've sent this question to the PerfParse users list, but I don't
>>>think that there are too many people on the list yet. Also, while I
>>>want to use PerfParse to display my performance data, this is really
>>>a Nagios question, as I have not yet reached the PerfParse portion
>>>of the setup. 
>>>
>>>I've recompiled Nagios 1.2 with performance data (file-based)
>>>enabled, and I then installed the plugins from yesterday's CVS head
>>>(which broke check_nagios, had to copy over my old one). I added the
>>>necessary directives to the main configuration file, as described in
>>>the Nagios Performance Data docs. For some reason, I'm still not
>>>getting anything in the perfdata logs. 
>>>
>>>Owner/Group and permissions are correct on the perfdata logs. At
>>>least I think that they are, they are the same as all of the other
>>>logs in nagios/var. 
>>>
>>>I thought that it could be that I'm just not using any of the plugins
>>>that utilize performance data. But since check_load is shown being
>>>graphed on the PerfParse webpage, I enabled it, ran it from the
>>>command line to verify that it returned perfdata, and then added it
>>>to Nagios. Still nothing. 
>>>
>>>Any ideas?
>>>
>>>Garry W. Cook, CCNA
>>>Network Infrastructure Manager
>>>MACTEC, Inc. - http://www.mactec.com/
>>>303.308.6228 (Office) - 720.220.1862 (Mobile)
> 
> 



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list