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