Macros not parsed in Nagiosgraph

I like to see if someone can help me figure out why I’m not getting the macros parsed in for nagiosgraph. Please see the miscommands.cfg. However, Nagios works fine.

Below are the steps I took for nagiosgraph.

Specs
Nagios 2.0
nagiosgraph 0.8.2
RHEL4u1

./configure --prefix=/opt/nagios --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios --with-nagios-user=nagios --with-nagios-group=nagios --with-command-group=nagios --with-default-perfdata --with-gd-lib=/usr/local/lib --with-gd-inc=/usr/local/include

added to insert.pl and show.cgi since the path is not in @INC
use lib ‘/opt/rrdtool/lib/perl/5.8.5/i386-linux-thread-multi/’;
/lib/perl/5.8.5/i386-linux-thread-multi/RRDs.pm is missing

make site-perl-install - doesn’t add it to the @INCl path

miscommands.cfg
define command {
command_name process-service-perfdata
command_line /opt/nagios/nagiosgraph/insert.pl “$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$”

command_line /bin/echo -e “$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$” >> /opt/nagios/var/host-perfdata

    }

nagios.cfg

Configuration for Nagiosgraph

#process_performance_data=1
#service_perfdata_command=process-service-perfdata
process_performance_data=1
service_perfdata_file=/opt/nagios/var/perfdata.log
service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=30
service_perfdata_file_processing_command=process-service-perfdata

[root@security-nagios nagios]# tail -f var/nagiosgraph.log
Thu May 11 16:42:42 2006 INSERT debug: Config logfile:/opt/nagios/var/nagiosgraph.log
Thu May 11 16:42:42 2006 INSERT debug: Config rrddir:/opt/nagios/nagiosgraph/rrd
Thu May 11 16:42:42 2006 INSERT debug: Config mapfile:/opt/nagios/nagiosgraph/map
Thu May 11 16:42:42 2006 INSERT debug: Config colorscheme:1
Thu May 11 16:42:42 2006 INSERT debug: Config heartbeat:600
Thu May 11 16:42:42 2006 INSERT debug: Config perflog:/opt/nagios/var/perfdata.log
Thu May 11 16:42:42 2006 INSERT debug: nagiosgraph spawned
Thu May 11 16:42:42 2006 INSERT debug: processing perfdata: ||||||||
Thu May 11 16:42:42 2006 INSERT info: Input lastcheck:
Thu May 11 16:42:42 2006 INSERT info: Input hostname:
Thu May 11 16:42:42 2006 INSERT info: Input perfdata:
Thu May 11 16:42:42 2006 INSERT info: Input servicedescr:
Thu May 11 16:42:42 2006 INSERT info: Input output:
Thu May 11 16:42:42 2006 INSERT warn: perfdata not recognized
Thu May 11 16:42:42 2006 INSERT debug: nagiosgraph exited

Not all plugins, actually very few, have perf data. They only have output outpul.
To find out, check the plugin itself from a terminal window. For example
[root@localhost libexec]# ./check_ping localhost -w 10,10% -c 20,20%
PING OK - Packet loss = 0%, RTA = 0.03 ms

Gee, no perf data, so if I want to use nagiosgraph, the plugin must have perfsta output, unless I"m mistaken. Last time I looked at nagiosgraph, plugins must have perf data output.
But nagiosgraph can use both or either/or, so give that a try instead.

You’re right. Perfdata is needed to return to nagiosgraph as stated in nagios.sourceforge.net/docs/2_0/perfdata.html.

Do you think this is related to why the macros aren’t able to be parsed? Please refer to miscommand.cfg. I currently get notifications from Nagios but when it comes to processing service perfdata I get |||||||| in my nagiosgraph.log. It should as least print the hostname. Any thoughts would be greatly appreciated.

service perfdata, exactly your problem. So get an app that works with “output” and “perfdata” both, like nagiostat.