Question about perfdata

Ben Clewett Ben at clewett.org.uk
Wed Jun 9 10:03:09 CEST 2004


Pedro Fernandes Macedo wrote:

> But I'm doing more tests here and it doesnt seem to work anyway... I've 
> made a small plugin that checks if xmms is running and then prints the 
> user that is running it... Here's the output:
> gargamel:/opt/nagios/var# /opt/nagios/libexec/check_nrpe -H 
> 150.164.254.25 -c check_xmms_192.168.1.4
> 1 usando xmms|user = someuser, numero = 1 - Usuário: someuser
> gargamel:/opt/nagios/var#
> 
> This service is configured in nagios , but it never shows up in the 
> serviceperf.log file... In the interface , it shows up ok...
> Any ideas on what could be wrong?
> 
> I've put my nagios.cfg below .... Just to be safe , I've enabled 
> perfdata both in nagios.cfg and in the template definitions for all 
> services...

First, would you mind if I comment on your performance syntax?  The 
official syntax is:

'label'=value[UOM];[warn];[crit];[min];[max]

Eg:

| metric1=1.0sec;2.0;3.0;0;4.0 metric2=1.0sec;2.0;3.0;0.0;4.0

Or a simpler version is also used by many plugins:

| metric1=1.0 metric2=2.0

See:

http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185

If you use that, parsing programs like PerfParse will be able to 
intemperate your output successfully.


Second, a check list of possible problems of why Nagios is not giving 
you the performance data.

Regards, Ben.



1. You are using the latest Nagios, 1.2.

2. You are using the latest nagios plugins.  Only these produce 
performance data.  You can check this by running one, like 'check_disk'. 
  If you have performance data, this should reply:

DISK OK - free space: / 8089 MB (22%); /boot 35 MB (76%) | 
/=8089MB;33312;35163;0;37014 /boot=34MB;40;42;0;45

You can see the performance data beyond the '|'.

Download from:

http://nagiosplug.sourceforge.net/snapshot
http://nagiosplug.sourceforge.net/snapshot/nagios-plugins-HEAD-200406080514.tar.gz

3. You have compiled nagios with the option to produce performance data. 
  Using the '--with-file-perfdata'.  Ie:

./configure --with-file-perfdata

4. Set the permissions on the servicelog file as:
     -rw-rw-r-- nagios nagios
ie:
$ chmod 664 serviceperf.log
$ chown nagios.nagios serviceperf.log

5. Check 'nagios.cfg', ensure you have these lines somewhere:

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$SERVICEDESC$\t$OUTPUT$\t$PERFDATA$

6. In services.cfg, ensure this line is in all services you want to 
monitor:  (Or the generic parent table.)

process_perf_data 1

7. In Nagios 'Process Info' page. At the bottom of the Process 
Information box, ensure you have:

"Performance Data Being Processed?    Yes"









-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
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