Page 1 of 1

PNP graph issue

Posted: Mon Sep 15, 2014 4:50 am
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

Re: PNP graph issue

Posted: Mon Sep 15, 2014 3:42 pm
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

Re: PNP graph issue

Posted: Tue Sep 16, 2014 4:28 am
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

Re: PNP graph issue

Posted: Tue Sep 16, 2014 10:40 am
by abrist

Re: PNP graph issue

Posted: Thu Sep 18, 2014 7:31 am
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

Re: PNP graph issue

Posted: Thu Sep 18, 2014 3:12 pm
by abrist
Can you post the defined commands for perfdata processing?

Re: PNP graph issue

Posted: Tue Sep 23, 2014 5:15 am
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

Re: PNP graph issue

Posted: Tue Sep 23, 2014 7:24 am
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
}

Re: PNP graph issue

Posted: Tue Sep 23, 2014 10:29 am
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.

Re: PNP graph issue

Posted: Thu Nov 06, 2014 12:34 pm
by kalyan1709
Thank you box293 for your support. It worked for me.

Thanks,
KalyanP