LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-19-2011, 05:45 PM   #1
khurramazizkhalid
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Rep: Reputation: 0
Nagios not processing perfdata


Hi All,

I am currently deploying Nagios as my NMS on CentOS 5 and using pn4nagios to create graphs.
I have successfully configured Nagios-3.3.3 along with nagios-plugins-1.4.15. its working fine and showing my windows machine and linux machine.
But here is the problem, when I try to configure pnp4nagios-0.6.11 I am unable to restart nagios service as it gives me error in commands.cfgfile on line number 240 which is as follows :

command_name process-service-perfdata
can sum1 tell me how to get rid of this error. i had encountered similar problem while using nagiosgrapher. kindly note that i have allowed perdata to be processed by setting its value to 1.
 
Old 03-20-2011, 10:55 AM   #2
ComputerErik
Member
 
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 268

Rep: Reputation: 42
Have you defined that command anywhere? What is the exact error you get?
 
Old 03-20-2011, 11:13 AM   #3
khurramazizkhalid
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
yes I have defined this command in /usr/local/nagios/etc/objects/commands.cfg & command is as follows :

define command {
command_name process-service-perfdata
command_line /usr/bin/perl /usr/localpnp4nagioslibexec/process_perfdata.pl
}

I have verifed and process_perfdata.pl does exist on this path. Error that I get is I am unable to restart nagios service & it says "Running Configuration check...CONFIG ERROR! Restart aborted. Check your Nagios configuration".

so i checked what was the error using
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

and exact error is
Error: Could not add object property in file '/usr/local/nagios/etc/objects/command.cfg' on line 424

and line 424 in commands.cfg is command_name process-serivce-perfdata . if i comments out this then nagios services starts without any error but then how can I create graphs
 
Old 03-20-2011, 11:26 AM   #4
ComputerErik
Member
 
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 268

Rep: Reputation: 42
I think your problem is you can't actually define the command in the commands.cfg file. You will need to instead write a script to place into the libexec directory with all of the other commands, and in commands.cfg you just place the name of this with the parameters to pass to it.

So in libexec create a shell script called check_perf (or whatever you like), and in there place the call to the perl script. Then your command configuration should have just somehting like this:


define command {
command_name process-service-perfdata
command_line check_perf
}

You should also check and see if there should be any arguments passed to this (such as hostname which is VERY common for almost all of the Nagios check commands) and pass that if needed.
 
Old 03-21-2011, 05:54 AM   #5
khurramazizkhalid
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Erik I am following this link for my pnp4nagios configuration http://docs.pnp4nagios.org/pnp-0.6/doc_complete . currently I am trying to configure Synchronous Mode & following this document step by step

Last edited by khurramazizkhalid; 03-21-2011 at 06:08 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: April Nagios Training Dates Include Advanced Nagios Class LXer Syndicated Linux News 0 03-18-2011 09:30 AM
Fail to install Nagios Pluggin nagios-plugins-1.4.15.tar.gz fred_xlf Linux - Software 1 11-27-2010 06:09 AM
cannot find Nagios web interface (Nagios 3.2.0) and O/S = Fedora 10 gutiojj Linux - Newbie 7 02-04-2010 08:55 AM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 05:33 PM
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 0 07-18-2006 08:33 PM


All times are GMT -5. The time now is 05:04 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration