-   Linux - Software (
-   -   Problem With Graphs in Pnp4nagios (

kaplan71 04-04-2008 10:31 AM

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:


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.

marozsas 04-04-2008 03:54 PM

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.

kaplan71 04-04-2008 04:36 PM

Hi there --

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


2008-04-04 16:05:32 [7579] No Performance Data for gray / Zombie Processes
2008-04-04 16:05:32 [7579] PNP exiting ...

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.


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

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?

marozsas 04-04-2008 05:42 PM

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:

# 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

# '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

$USER1$/check_nrpe -H $HOSTADDRESS$ -c whatever
You need to define a remote check command as:


# 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:

# '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.


kaplan71 04-07-2008 10:34 AM

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.

marozsas 04-07-2008 10:50 AM

In your next attempt, I suggest you to subscribe to the list which is the best place to get help about PNP4nagios.

best regards,

mikinaldo 11-12-2008 10:11 AM

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] 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


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