PNP graph issue

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kalyan1709
Posts: 43
Joined: Tue Oct 16, 2012 12:45 am

PNP graph issue

Post by kalyan1709 »

Hi Guys,

I have upgraded my Nagios Core 3.5 to Version 4.0.2. Everything seems normal, But my pnp graphs were stopped working after upgrade og my Nagios Core to 4.0.2.

Any suggestions or fixes please?

Thanks,
KalyanP
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: PNP graph issue

Post by Box293 »

Just a stab at the dark but perhaps you need to switch to Bulk Mode with NPCD.

https://docs.pnp4nagios.org/pnp-0.6/mod ... _with_npcd
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
kalyan1709
Posts: 43
Joined: Tue Oct 16, 2012 12:45 am

Re: PNP graph issue

Post by kalyan1709 »

Hi Box293,

Thanks for your quick reply.
Currently I am using pnp-0.4 version. So what can I do now?

Thanks,
KalyanP
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: PNP graph issue

Post by abrist »

Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
kalyan1709
Posts: 43
Joined: Tue Oct 16, 2012 12:45 am

Re: PNP graph issue

Post by kalyan1709 »

I have followed below URL to upgrade pnp:

https://docs.pnp4nagios.org/pnp-0.6/upgrade

Existing pnp configuration
----------------------------------------

*** Configuration summary for pnp 0.4.14 05-02-2009 ***

General Options:
------------------------- -------------------
Nagios user/group: nagios nagios
Install directory: /usr/local/nagios
HTML Dir: /usr/local/nagios/share/pnp
Config Dir: /usr/local/nagios/etc/pnp
Location of rrdtool binary: /usr/bin/rrdtool Version 1.3.1
RRDs Perl Modules: FOUND (Version 1.3001)
RRD Files stored in: /usr/local/nagios/share/perfdata
process_perfdata.pl Logfile: /usr/local/nagios/var/perfdata.log
Perfdata files (NPCD) stored in: /usr/local/nagios/var/spool/perfdata/


After upgrade current pnp configuration is
----------------------------------------------------------

*** Configuration summary for pnp4nagios-0.6.20 03-03-2013 ***

General Options:
------------------------- -------------------
Nagios user/group: nagios nagios
Install directory: /usr/local/pnp4nagios
HTML Dir: /usr/local/pnp4nagios/share
Config Dir: /usr/local/pnp4nagios/etc
Location of rrdtool binary: /usr/bin/rrdtool Version 1.4.7
RRDs Perl Modules: FOUND (Version 1.4007)
RRD Files stored in: /usr/local/pnp4nagios/var/perfdata
process_perfdata.pl Logfile: /usr/local/pnp4nagios/var/perfdata.log
Perfdata files (NPCD) stored in: /usr/local/pnp4nagios/var/spool

Web Interface Options:
------------------------- -------------------
HTML URL: http://localhost/pnp4nagios
Apache Config File: /etc/httpd/conf.d/pnp4nagios.conf




commands
-------------------

define host {
name host-pnp
register 0
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_
}

define service {
name srv-pnp
register 0
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
}


From URL: https://docs.pnp4nagios.org/pnp-0.6/upgrade I didn't understand the section "Attention" like in which file we need to update that '$lower'' and "Upgrade scenario using NPCD"

Please suggest me any solution.

Thanks,
KalyanP
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: PNP graph issue

Post by abrist »

Can you post the defined commands for perfdata processing?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
kalyan1709
Posts: 43
Joined: Tue Oct 16, 2012 12:45 am

Re: PNP graph issue

Post by kalyan1709 »

Hi Abrist,

I have already posted them:

commands
-------------------

define host {
name host-pnp
register 0
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_
}

define service {
name srv-pnp
register 0
action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
}

Thanks,
KalyanP
kalyan1709
Posts: 43
Joined: Tue Oct 16, 2012 12:45 am

Re: PNP graph issue

Post by kalyan1709 »

sorry,

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

define command {
command_name process-service-perfdata
command_line /usr/bin/perl /usr/local/nagios/libexec/process_perfdata.pl
}
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: PNP graph issue

Post by Box293 »

To start using the NPCD mode the commands are different:

For example, on my test system:

Code: Select all

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

define command {
    command_name    process-host-perfdata-file-bulk-npcd
    command_line    /bin/mv /usr/local/nagios/var/host-perfdata /usr/local/nagios/var/spool/perfdata/host-perfdata.$TIMET$
    }
You also need to configure NPCD and start it, on my test system I did this with:

Code: Select all

cp /usr/local/nagios/etc/pnp/npcd.cfg-sample /usr/local/nagios/etc/pnp/npcd.cfg
/usr/local/nagios/bin/npcd -d -f /usr/local/nagios/etc/pnp/npcd.cfg
chkconfig --add npcd
chkconfig npcd on
service npcd start
NOTE: this steps were from a v4 test system so on v6 it might be a little different.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
kalyan1709
Posts: 43
Joined: Tue Oct 16, 2012 12:45 am

Re: PNP graph issue

Post by kalyan1709 »

Thank you box293 for your support. It worked for me.

Thanks,
KalyanP
Locked