PNP4Nagios not showing Graph

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
arunkrishnan.tvm
Posts: 28
Joined: Wed Mar 16, 2016 12:31 am

PNP4Nagios not showing Graph

Post by arunkrishnan.tvm »

Hi

I have successfully installed PNP4Nagios 6.0 and added host/service details to get the graph but it is not displaying any graph.

When I try to check the configuration, I am getting the following error:

CRIT] Command looks suspect (/bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.service)

Following is my commands.cfg and nagios.cfg configuration details. Is there anything should I change:

Commands.cfg
============

define command {
command_name process-host-perfdata-file-bulk
command_line /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.host
}

define command {
command_name process-host-perfdata-file-pnp-bulk
command_line /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/perfdata/host-perfdata.$TIMET$
}

define command {
command_name process-host-perfdata-pnp-normal
command_line /usr/bin/perl /usr/local/nagios/libexec/process_perfdata.pl -d HOSTPERFDATA
}

define command {
command_name process-service-perfdata-file-bulk
command_line /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/xidpe/$TIMET$.perfdata.service
}

define command {
command_name process-service-perfdata-file-pnp-bulk
command_line /bin/mv /usr/local/nagios/var/service-perfdata /usr/local/nagios/var/spool/perfdata/service-perfdata.$TIMET$
}

define command {
command_name process-service-perfdata-pnp-normal
command_line /usr/bin/perl /usr/local/nagios/libexec/process_perfdata.pl

nagios.cfg
=========

# PNP settings - bulk mode with NCPD
process_performance_data=1
# service performance data
service_perfdata_file=/usr/local/nagios/var/service-perfdata
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$\tSERVICEOUTPUT::$SERVICEOUTPUT$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file-bulk
# host performance data
host_perfdata_file=/usr/local/nagios/var/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tHOSTOUTPUT::$HOSTOUTPUT$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file-bulk

Thanks & Regards,
Arun
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: PNP4Nagios not showing Graph

Post by tgriep »

Is the system you installed PNP4Nagios an Nagios XI server or an Nagios Core server?
The Nagios XI server should already have PNP4Nagios installed.
Can you login to the server as root, run the following and post the full output?

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
arunkrishnan.tvm
Posts: 28
Joined: Wed Mar 16, 2016 12:31 am

Re: PNP4Nagios not showing Graph

Post by arunkrishnan.tvm »

Yes, I am using Nagios XI server.

Please find the command output below:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

[root@INTRVSUK-NG01 ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/static/check_mk_templates.cfg', starting at line 53)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/static/check_mk_templates.cfg', starting at line 122)
Error: Could not find a service matching host name 'INTRVSUK-AP03' and description 'Physical Memory Usage' (config file '/usr/local/nagios/etc/servicegroups.cfg', starting on line 129)
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 5006 services.
Warning: Host 'NLNHSRK-ESX20' has no default contacts or contactgroups defined!
Checked 875 hosts.
Checked 46 host groups.
Checked 21 service groups.
Checked 106 contacts.
Checked 6 contact groups.
Checked 400 commands.
Checked 107 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 875 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 107 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 1
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: PNP4Nagios not showing Graph

Post by rkennedy »

If you're using XI, you will need to use the built in version of PNP4Nagios which is 4.x. At this time, 6.0 is not supported.
Former Nagios Employee
arunkrishnan.tvm
Posts: 28
Joined: Wed Mar 16, 2016 12:31 am

Re: PNP4Nagios not showing Graph

Post by arunkrishnan.tvm »

OK, How to roll-back to version 4.x
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: PNP4Nagios not showing Graph

Post by tmcdonald »

We don't really have rollback instructions documented since we don't support other versions, but you can try the following:

Code: Select all

cd /tmp
wget assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xzf xi-latest.tar.gz
cd nagiosxi/subcomponents/pnp
./install
I would strongly recommend taking a VM snapshot first if you can, otherwise an XI backup:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Former Nagios employee
arunkrishnan.tvm
Posts: 28
Joined: Wed Mar 16, 2016 12:31 am

Re: PNP4Nagios not showing Graph

Post by arunkrishnan.tvm »

Thank you

Please let me know if it possible to use any external plugin like Nagiosgraph in Nagios XI
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: PNP4Nagios not showing Graph

Post by rkennedy »

Nagios XI already has graphs built in, what exactly are you looking to accomplish?
Former Nagios Employee
arunkrishnan.tvm
Posts: 28
Joined: Wed Mar 16, 2016 12:31 am

Re: PNP4Nagios not showing Graph

Post by arunkrishnan.tvm »

Using PnP4nagios like tool we can see Host, memory, CPU, Disk, Uptime and Ping utilization of multiple servers in same page.
When we try to get the same info from Nagios Xi (Graphs - Performance Graphs) it displys only host graph details.

E.g:
If I type a name INTRN in host selection option under "Performance Graphs", then it will display only Host graphs for all host starting with the name INTRN.

The same when I search from PnP4nagios then it will display all graphs (Host, memory, CPU, Disk, Uptime and Ping) for all host starting with the name INTRN. We configure like below in the PNP4nagios configuration file:

Code: Select all

define graph { 
         host_name       INTRN                   # Every host starting with 'INTRN' 
         service_desc           Memory            
         source         0                                      
}

define graph { 
         host_name       INTRN                    
         service_desc           CPU               
         source         0                                    
}

define graph { 
         host_name       INTRN                    
         service_desc           Disk              
         source         0                                     
}

define graph { 
         host_name       INTRN                   
         service_desc           Uptime            
         source         0                                     
}
define graph { 
         host_name       INTRN                    
         service_desc           Ping              
         source         0                                      
}

Another advantage is we can create a seperate user account in Pnp4nagios for customer use, using this customers able to verify the performance graphs. Through this way we can avoid giving direct access to Nagios XI console for users.

Is it possible to use the same features in Nagios Xi ?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: PNP4Nagios not showing Graph

Post by rkennedy »

While it may be possible, I don't think we can support it.

If you're looking for graphs on a service level, you should still be able to. Are you running into issues seeing this? Attached is a screenshot of the service 'current load' for my localhost machine.
service-current-load.PNG
You do not have the required permissions to view the files attached to this post.
Former Nagios Employee
Locked