LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-04-2008, 10:31 AM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
Problem With Graphs in Pnp4nagios


Hi there --

I have installed the Pnp4nagios software onto our Nagios 2.6 system. The server is using the php 5.1.6 release along with the 1.2.27 release of the rrdtool. As part of the installation procedure, I created an entry in the

serviceextinfo.cfg file shown below:

Code:
define serviceextinfo{
host_name               gray
service_description     Web Server Status
action_url              /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
}


The service description is a copy of the same line for the host in question within the services.cfg file. I ran the nagios -v nagios.cfg command to confirm there were no errors. There were several other checks associated with the host, but I did not include them in the serviceextinfo file.

I restarted Nagios, and waited for an hour for graphs and other information to be generated on-screen. So far there has not been any graphs generation appearing on the php page. I checked the hostname directory under the perfdata directory, and there are rrd and xml files being generated.

To verify that php is full operational, I installed the query.php, or Network Query, tool into the base directory of the Apache server, and I was able to see and use it without a problem. It appears there is a problem with php somewhere, but I am not sure where the problem lies.

Does anyone have an idea as to what other step(s) do I need to take? Thanks.
 
Old 04-04-2008, 03:54 PM   #2
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,461
Blog Entries: 1

Rep: Reputation: 66
I have no idea...but you can give us more information.

Increase the pnp debug level (at file ngraph.ncfg;log_level 255) and restart nagios.
Look for error messages at log_file directive at same file, usually /var/log/nagios/ngraph.log.
 
Old 04-04-2008, 04:36 PM   #3
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Original Poster
Rep: Reputation: 39
Hi there --

I set the pnp log to debug, and restarted Nagios. Here are excerpts from the perfdata.log file:

Quote:
2008-04-04 16:05:32 [7579] No Performance Data for gray / Zombie Processes
2008-04-04 16:05:32 [7579] PNP exiting ...
Quote:
2008-04-04 16:06:40 [7759] Found Performance Data for gray / Free Space / (/=8039MB;108144;121662;0;135181)
2008-04-04 16:06:40 [7759] No Custom Template found for check_nrpe (/usr/local/nagios/etc/pnp//check_commands/check_nrpe.cfg)
I checked the above directory, and there is no check_nrpe.cfg file in that location.

Quote:
2008-04-04 16:06:40 [7759] RRDs::update /usr/local/nagios/share/perfdata/gray/Free_Space__.rrd 1207339600:8039
2008-04-04 16:06:40 [7759] /usr/local/nagios/share/perfdata/gray/Free_Space__.rrd updated
Quote:
2008-04-04 16:07:20 [8000] Found Performance Data for gray / Free Space /boot (/boot=18MB;388;437;0;486)
2008-04-04 16:07:20 [8000] No Custom Template found for check_nrpe (/usr/local/nagios/etc/pnp//check_commands/check_nrpe.cfg)
2008-04-04 16:07:20 [8000] RRD Datatype is GAUGE
2008-04-04 16:07:20 [8000] Template is check_nrpe.php
Is there additional information needed at this time?
 
Old 04-04-2008, 05:42 PM   #4
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,461
Blog Entries: 1

Rep: Reputation: 66
Yeah, now I can guess something.....

Try to setup a localhost machine to check if you get performance data and graphs for the local machine.
Try with a local checks, not remote checks with nrpe. Something like that:
Code:
# Service definition
define service{
        use                             normal-service          ; Name of service template to use
        host_name                       localhost
        service_description             LOAD
        servicegroups                   resources
        check_command                   check_local_load!15,10,5!30,25,20
        }
and check_local_load is defined as
Code:
# 'check_local_load' command definition
define command{
        command_name    check_local_load
        command_line    $USER1$/check_load -w $ARG1$ -c $ARG2$
        }
If you get graphs for this service, than the problem is with check_nrpe.

With PNP you can not use a check_command directly in services.cfg as
Code:
$USER1$/check_nrpe -H $HOSTADDRESS$ -c whatever
.
You need to define a remote check command as:

Code:
# Remote Service definition
define service{
        use                             critical-service                ; Name of service template to use
        host_name                       server,minibit
        service_description             LOAD
        servicegroups                   resources
        check_command                   check_load
        }
and define check_load (in checkcommands.cfg or whatever) as:
Code:
# 'check_load' remote command definition
define command{
        command_name    check_load
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_load
        }
'cause PNP uses the check_command name - in later is check_load (not check_nrpe) - to match a template file (in templates.dist).

I'm sorry, I will be back only monday morning.
I hope you figure out how to fix your PNP.

see'ya,
 
Old 04-07-2008, 10:34 AM   #5
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Original Poster
Rep: Reputation: 39
Hi there --

I haven't had success in getting pnp4nagios to work, and since I don't have time right now to continue trying to deploy it, I am going to drop
it from our server.

I may revisit deploying it at a later date. Thanks for the help anyway.

Best regards.
 
Old 04-07-2008, 10:50 AM   #6
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,461
Blog Entries: 1

Rep: Reputation: 66
In your next attempt, I suggest you to subscribe to the list https://lists.sourceforge.net/lists/...p4nagios-users which is the best place to get help about PNP4nagios.

best regards,
 
Old 11-12-2008, 10:11 AM   #7
mikinaldo
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
Hi @ all,
I've exactly the problem described in this thread, but i can not resolve this.
my check are configured whith nrpe ( see the example):


# 'check_nt_cpu'command definition
define command{
command_name check_nt_cpu
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 9666 -c nt_cpuload
}

the checks result is ok, but pnp don't show the graphic ( this is the error):

RRD Database/usr/local/nagios/share/perfdata/volsrv07/check_nt_disk.rrd not found.

this is the log:


/usr/local/nagios/var/perfdata.log:2617973:2008-11-12 16:05:12 [20861] process_perfdata.pl-0.4.3 starting in DEFAULT Mode
/usr/local/nagios/var/perfdata.log:2618052:2008-11-12 16:05:12 [20861] Datatype set to 'SERVICEPERFDATA'
/usr/local/nagios/var/perfdata.log:2618115:2008-11-12 16:05:12 [20861] No Performance Data for volsrv07 / check_nt_cpu
/usr/local/nagios/var/perfdata.log:2618192:2008-11-12 16:05:12 [20861] PNP exiting ...


for some check pnp running correctly and show the graphic (see below)


usr/local/nagios/var/perfdata.log:2617009:2008-11-12 16:04:52 [20843] RRD Datatype is GAUGE
/usr/local/nagios/var/perfdata.log:2617059:2008-11-12 16:04:52 [20843] Template is check_root.php
/usr/local/nagios/var/perfdata.log:2617114:2008-11-12 16:04:52 [20843] data2rrd called
/usr/local/nagios/var/perfdata.log:2617158:2008-11-12 16:04:52 [20843] RRDs::update /usr/local/nagios/share/perfdata/relayposta/check_root.rrd 1226502292:498
/usr/local/nagios/var/perfdata.log:2617273:2008-11-12 16:04:52 [20843] /usr/local/nagios/share/perfdata/relayposta/check_root.rrd updated




Perfdata.log is ok:

$LASTSERVICHECKS$||volsrv07||check-memload||Mem: 1147 MB (56%) / 2047 MB (43%) Paged Mem: 1934 MB (48%) / 3947 MB (51%)||
$LASTSERVICHECKS$||volsrv07||snmp-check-disk||C:\ Label: Serial Number 1c61bfc8: 67%used(6896MB/10229MB) E:\ Label:SEP Serial Number 60e6cba4: 46%used(9365MB/20473MB) (80%) : OK||
$LASTSERVICHECKS$||volsrv07||check_sep_management||Symantec Management Client OK||
$LASTSERVICHECKS$||volsrv07||check_load_win||NOW: Mean:0.000000% Variance: 0.000000% CUMULATIVE: Mean:0.000000% Variance: 0.000000%||
$LASTSERVICHECKS$||volsrv07||check_windows_time||Windows Time OK||
$LASTSERVICHECKS$||volsrv07||snmp-check-procs||1 services active (matching dhcp) : OK||
$LASTSERVICHECKS$||relayposta||check_mailq||CRITICAL: Error code 69 returned from /usr/bin/mailq||
$LASTSERVICHECKS$||relayposta||check_load||OK - load average: 0.00, 0.00, 0.00||load1=0.000;15.000;30.000;0; load5=0.000;10.000;25.000;0; load15=0.000;5.000;20.000;0;
$LASTSERVICHECKS$||volsrv07||check_sep_setting_manager||Symantec Settings Manager OK||
$LASTSERVICHECKS$||volsrv07||check_sep_manager||Symantec Endpoint Protection Manager OK||


I see variuos Thread over Internet, and for me the problem is the template that pnp use to convert data contained in perfdata logs to the rrd .

Can you help me ????


Thx in advance

Michele
 
  


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
Hey guys Having problem with Munin updating graphs zombiefx Linux - Software 0 05-17-2006 02:26 AM
help with MRTG graphs!! debloxie Linux - Networking 4 10-05-2004 12:13 PM
SNMP - graphs vladimir-dk *BSD 1 09-16-2004 10:06 AM
Strange Graphs karunesh Linux - Networking 0 01-24-2004 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration