Im trying to set-up nagiosgraph, i think i installed everything the right way
I installed RRDtool with yum, and i see its having trouble with RRD so maybe i did something wrong there
[root@nagios nagiosgraph]# ./insert.pl
Can’t locate loadable object for module RRDs in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./insert.pl line 9
Compilation failed in require at ./insert.pl line 9.
BEGIN failed–compilation aborted at ./insert.pl line 9.
thats the message i get when i try to do ./insert.pl
Yep:
the line “warn - perfdata not recognized” means that the data sent to nagiosgraph (through insert.pl) is not recognized by the parser - ie: the “map” file
BUT, the thing is, from these lines:
Wed Sep 10 15:23:47 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ info - Input hostname:
Wed Sep 10 15:23:47 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ info - Input perfdata:
Wed Sep 10 15:23:47 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ info - Input servicedescr:
Wed Sep 10 15:23:47 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ info - Input output:
we can see that nothing is sent to nagiosgraph.
To compare, here is an extract of my logfile:
Wed Sep 10 16:11:23 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ debug - nagiosgraph spawned
Wed Sep 10 16:11:23 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ debug - processing perfdata: 1221055881||webmail.9services.com||Webmail||WebInject OK - All tests passed successfully in 0.412 seconds||time=0.412;;;0
Wed Sep 10 16:11:23 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ info - Input lastcheck:1221055881
Wed Sep 10 16:11:23 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ info - Input hostname:webmail.9services.com
Wed Sep 10 16:11:23 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ info - Input perfdata:time=0.412;;;0
Wed Sep 10 16:11:23 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ info - Input servicedescr:Webmail
Wed Sep 10 16:11:23 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ info - Input output:WebInject OK - All tests passed successfully in 0.412 seconds
Wed Sep 10 16:11:23 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ debug - Checking /nagios_dsi_sup/nagiosgraph/rrd/webmail.9services.com/Webmail___WebInject.rrd
Wed Sep 10 16:11:23 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ info - RRDs::update /nagios_dsi_sup/nagiosgraph/rrd/webmail.9services.com/Webmail___WebInject.rrd 1221055881:0.412
Wed Sep 10 16:11:23 2008 $RCSfile: insert.pl,v $ $Revision: 1.25 $ debug - nagiosgraph exited
You should check your “process-service-perfdata” command definition
Here is mine:
define command{
command_name process-service-perfdata
command_line /appli/nagios/nagiosgraph/insert.pl “$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$”
}
Nagiosgraph.log just stays the same.
RRD files arent updated
Nagios just doenst run the script.
But like i said, when my command line isnt correct it seems that it does try to run it because i can see this error:
[09-10-2008 09:38:15] Warning: Attempting to execute the command “/usr/local/nagios/etc/nagiosgraph/insert.pl $LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$” resulted in a return code of 127. Make sure the script or binary you are trying to execute actually exists…
But when i correct the command line to:
define command{
command_name process-service-perfdata
command_line /usr/local/nagios/etc/nagiosgraph/insert.pl
}
it seems like it just doenst run at all…
When i manually try to run insert.pl it updates everything
Ok; the good thing is that you have identified your error you’ll just have to solve it now …
From what I can see, this is likely to be a rights error: your nagiosgraph dir is quite a mess concerning the rights
I think you should change the owner of the files to nagios (chown -R nagios:nagcmd *).
and if it’s still not working, I had to give all the rights on all the files in this dir for nagiosgraph to work (chmod -R 777 *) … yes, I know it’s definitely not the best way, but at least, it’s working