NagiosGraph has stopped plotting data

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
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

NagiosGraph has stopped plotting data

Post by neworderfac33 »

Good morning,
I currently have two installations of Core, 4.2.4 and 4.3.2.
Each has NagiosGraph 1.5.2 installed, along with PNP4Nagios.
I have also set up Grafana on the 4.3.2 installation
On the 4.2.4 setup NagiosGraph stopped plotting data mid-May (shows how much attention people are paying to it!)
On the 4.3.2 setup, the charts are there, there's just nothing being plotted in them. Also, only the "Year" charts are displayed, instead of "Day", "Week", "Month" and "Year", for whatever service on whatever host I try to check.
PNP4Nagios is generate charts and plotting data on both instances.

I'm pretty confident in my installation documentation, having also used it in the past to set up NagiosGraph on the a now defunct installation on Core 4.0.8, which worked fine.
I have just reinstalled on the 4.3.2 server, but it still won't plot any data.
I was just wondering if anyone was aware of any issues around setting op PNP4Nagios and/or Grafana that might cause my NagiosGraph to stop working?

Thanks in advance

Pete
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosGraph has stopped plotting data

Post by lmiltchev »

NagiosGraph is NOT one of our products. You can post all of the relevant to NagiosGraph configs here, so that we could review them, and try to help you. You may get a faster resolution contacting Nagios Graph's developers though. Have you tried posting your question on the NagiosGraph support forum?

https://sourceforge.net/p/nagiosgraph/discussion/394748
Be sure to check out our Knowledgebase for helpful articles and solutions!
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: NagiosGraph has stopped plotting data

Post by neworderfac33 »

I found the answer to my question at http://nagios.fm4dd.com/nagiosgraph/, if anyone's interested.
In my /usr/local/nagios/etc/nagios.cfg, I appended information firstly for NagiosGraph:

Code: Select all

process_performance_data=1
service_perfdata_file=/tmp/perfdata.log
service_perfdata_file_template=$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=30
service_perfdata_file_processing_command=process-service-perfdata-for-nagiosgraph
then subsequently for PNP4Nagios:

Code: Select all

service_perfdata_file=/usr/local/pnp4nagios/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$
service_perfdata_file_mode=a
service_perfdata_file_processing_interval=15
service_perfdata_file_processing_command=process-service-perfdata-file

# host performance data for PNP4Nagios
host_perfdata_file=/usr/local/pnp4nagios/var/host-perfdata
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
host_perfdata_file_mode=a
host_perfdata_file_processing_interval=15
host_perfdata_file_processing_command=process-host-perfdata-file
In this case, what has happened is, the value for service_perfdata_file_template as defined in the sceond block of settings (PNP4nagios] has overwritten the value set up for NagiosGraph, so NagiosGraph stops working.
I tried commenting out the PNP4Nagios sections and restaring Nagios, and sure enough, PNP4nagios stopped working and NagiosGraph resumed!
The author of the article goes on to detail a Perl script which allows for both tools to work simultaneously, but as I only need PNP4Nagios (as a means to drive Grafana), the easiest solution for me was to comment out the NagiosGraph section and remove all references to NagiosGraph from my service definitions.

Hope this helps someone else if they encounter the same problem!

Pete
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: NagiosGraph has stopped plotting data

Post by lmiltchev »

Thank you, neworderfac33 for posting the solution for everyone to see! I will be closing this topic now, and marking it as resolved.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked