Help with PNP4nagios graphs

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
petronagios
Posts: 28
Joined: Tue Aug 16, 2011 8:02 am

Help with PNP4nagios graphs

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Help with PNP4nagios graphs

Post 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>
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.
petronagios
Posts: 28
Joined: Tue Aug 16, 2011 8:02 am

Re: Help with PNP4nagios graphs

Post by petronagios »

Hi, I've attached the logs, let me know if you need anything else.

Thanks
Attachments
perfdata.log
perfdata.log
(13.25 KiB) Downloaded 130 times
npcd.log
npcd.log
(7.28 KiB) Downloaded 132 times
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Help with PNP4nagios graphs

Post by cmerchant »

You should check that the system time is current and then restart npcd.

Code: Select all

service npcd restart
petronagios
Posts: 28
Joined: Tue Aug 16, 2011 8:02 am

Re: Help with PNP4nagios graphs

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Help with PNP4nagios graphs

Post 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
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.
petronagios
Posts: 28
Joined: Tue Aug 16, 2011 8:02 am

Re: Help with PNP4nagios graphs

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Help with PNP4nagios graphs

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked