Page 1 of 1

Help with PNP4nagios graphs

Posted: Thu Jan 15, 2015 6:09 am
by petronagios
Hi, we have written a plugin which runs successfully and returns data for the number of licenses being used on a license server. We are running pnp4nagios to graph the output and while some of the graphs are correct others don't display the warn/crit lines. We are running nagios core 3.4.1 and pnp4nagios v 0.6.19. I've attached two screen shots showing the plugin output
chec_output.PNG
and some graphs produced
graphs1.PNG
Can you help?

Thanks
Steve.

Re: Help with PNP4nagios graphs

Posted: Thu Jan 15, 2015 11:54 am
by abrist
Lets check the performance data logs:

Code: Select all

tail -25 /usr/local/nagios/var/perfdata.log
tail -25 /usr/local/pnp4nagios/var/npcd.log
<your paths could be different>

Re: Help with PNP4nagios graphs

Posted: Mon Jan 19, 2015 9:06 am
by petronagios
Hi, I've attached the logs, let me know if you need anything else.

Thanks

Re: Help with PNP4nagios graphs

Posted: Mon Jan 19, 2015 1:36 pm
by cmerchant
You should check that the system time is current and then restart npcd.

Code: Select all

service npcd restart

Re: Help with PNP4nagios graphs

Posted: Mon Jan 26, 2015 4:25 am
by petronagios
Hi, sorry I realized the graphs are auto scaling the vertical axis so the warning and critical lines wont be displayed as the perf data is no where near warning or critical! I don't know much php do you know how I stop the graph from auto scaling? They are using the default template.

Many thanks
Steve.

Re: Help with PNP4nagios graphs

Posted: Mon Jan 26, 2015 12:05 pm
by abrist
You are experiencing 2 common errors:
#1:

Code: Select all

2015-01-19 14:03:59 [25347] [0] RRDs::update /usr/local/pnp4nagios/var/perfdata/sclxpgas02/check_uptime.rrd 1421676227:640.7958
2015-01-19 14:03:59 [25347] [0] RRDs::update ERROR illegal attempt to update using time 1421676227 when last update time is 1421676227 (minimum one second step)
Check your system time, php.ini timezone, and /etc/localtime for mismatches.

#2:

Code: Select all

2015-01-19 14:03:59 [25347] [0] RRDs::update /usr/local/pnp4nagios/var/perfdata/TVMWPCDB03/C___Drive.rrd 1421676227:24:32882868224
2015-01-19 14:03:59 [25347] [0] RRDs::update ERROR expected 1 data source readings (got 2) from 1421676227:24:32882868224
You may want to run the script covered in the XI FAQ to fix the missing datasources from the rrds - it is for XI, but can be used on core boxes as well - just change the path to where your rrds are located:
http://support.nagios.com/wiki/index.ph ... 14_Upgrade

Re: Help with PNP4nagios graphs

Posted: Wed Jan 28, 2015 5:03 am
by petronagios
Hi Thanks for your reply, our timezone settings on the nagios master look ok, they are . ...

/etc/php.ini
date.timezone = "Europe/London"

/etc/sysconfig/clock
ZONE="Europe/London"
UTC=false
ARC=false

ntpstat
synchronised to NTP server (x.x.x.x.) at stratum 3
time correct to within 121 ms
polling server every 1024 s

I've checked through our service/host configuration files and there are no duplicate checks being carried out even though we are seeing the multiple source readings message ('expected 1 data source readings (got 3) from ') in the perfdata log file. The message doesn't seem to be confined to a particular check but happens on almost all servers.

npcd is running in bulk with 15 sec's between dirscans

nagios.cfg has the following config
max_check_result_reaper_time=10
check_result_reaper_frequency=10
interval_length=60

Thanks
Steve.

Re: Help with PNP4nagios graphs

Posted: Wed Jan 28, 2015 12:04 pm
by scottwilkerson
The other problem is your RRD only have 1 datasource in it but your plugin is sending 2 datasources now.

The easiest way to resolve this would be to remove the offending RRD ( /usr/local/pnp4nagios/var/perfdata/TVMWPCDB03/C___Drive.rrd ) and let it re-generate