Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have configured nagiosgrapher correctly, as far as I can tell, but the logs continue to report a lack of data. For example, for load, in /var/log/nagiosgrapher/ngraph.log:

 2012-08-02 22:30:16 PIPE: myhost    CPU Load        OK - load average: 0.00, 0.00, 0.00     load1=0.000;15.000;30.000;0; load5=0.000;10.000;25.000;0; load15=0.000;5.000;20.000;0;
 2012-08-02 22:30:16 VALUES: [myhost][CPU Load]:No matching output values found...

I have configured Nagios and Nagiosgrapher on Debian systems before and have never run into an issue like this, and thus far have been unable to solve it.

The systems are using only default plugins. The relevant /etc/nagios3/nagios.cfg values are:

 process_performance_data=1

and

 service_perfdata_command=ngraph-process-service-perfdata-pipe

I have tried restarting both Nagios and Nagiosgrapher in varying order, which was something I found on Google searches, but that didn't seem to have an effect.

Is there any idea of what I might be doing wrong or where to look? All other Nagios functionality seems to be behaving normally on both local and remote hosts.

share|improve this question

2 Answers 2

The fact that the log is showing that PIPE line means that you have configured Nagios to send the data to Nagiosgrapher correctly.

The "No mathcing output values found" line means that the regexp in the "CPU Load" ngraph definition didn't match anything in the data that it got ("OK - load average: 0.00, 0.00, 0.00 load1=0.000;15.000;30.000;0; load5=0.000;10.000;25.000;0; load15=0.000;5.000;20.000;0;").

You should have a config file (perhaps "check_load.ncfg") that defines the ngraph for services containing the name "load". Check in the ngraph.d folder, or whever you put your configuration snippets for Nagiosgrapher, and then make sure the "graph_log_regex" or "graph_perf_regex" entries makes sense.

share|improve this answer
    
Thanks for the response. I did look for a configuration file prior to posting my question, however, there is no check_load.* file anywhere that I can find, particularly in /etc/nagiosgraphger/ngraph.d or anywhere else in the /etc/nagiosgrapher hierarchy. I am wondering if there is some other package that needs installing, or if something odd has happened with my configuration? I will take a look at the contents of the various debian nagios* packages and see, but any other ideas are appreciated as well. Is there maybe a default regex somewhere perhaps that might be getting used for load? –  futureal Aug 4 '12 at 7:07
    
According to the package manifest, there should be a nconf snippet for "LOAD" in /usr/share/nagiosgrapher/debian/cfg/ngraph.d/standard/check_load.ncfg which gets copied to /etc/nagiosgrapher/ngraph.d/standard/check_load.ncfg post-install. See packages.debian.org/squeeze/amd64/nagiosgrapher/filelist –  Keith Aug 30 '12 at 21:07
up vote 0 down vote accepted

Going to answer my own question here in detail since this drove me nuts for awhile, and hopefully it will help somebody else down the road looking for the same. Thanks to Keith's answer, though, which started me on the right path here.

To debug this, I edited the /etc/nagiosgrapher/ngraph.ncfg file and set the log to the most verbose setting possible:

log_file                /var/log/nagiosgrapher/ngraph.log
log_level               255

I then restarted nagiosgrapher via /etc/init.d/nagiosgrapher restart and started to watch the log at the location above.

There are three things that happened here, all of which contributed to my problem:

Problem 1

For whatever reason, the Debian distribution of nagiosgrapher no longer installs the check_disk.ncfg and check_load.ncfg graph definitions. I always assume that I have done something wrong when things don't work, but in this case, they just aren't there -- BUT, they are in the distribution and on the system. You just need to copy them:

 cp /usr/share/nagiosgrapher/debian/cfg/ngraph.d/standard/check_disk.ncfg /etc/nagiosgrapher/ngraph.d/standard
 cp /usr/share/nagiosgrapher/debian/cfg/ngraph.d/standard/check_load.ncfg /etc/nagiosgrapher/ngraph.d/standard

It is possible this is just a problem with the package install script, but I have not verified this, and your mileage may vary. This worked for me though.

Problem 2

I had renamed the service-description from "Current Load" to "CPU Load" in the /etc/nagios3/conf.d/services_nagios2.cfg file where I defined it, which seemed innocent at the time. However, the nagiosgrapher package ships with a plugin called check_hardware which has a block defined as "CPU", and apparently, nagiosgrapher looks at that service description, parses it on whitespace, and then checks for matching blocks, in this case checking both "CPU" and "Load". Further, any time one of those blocks fails to match, the entire write fails, resulting in the message I got in my question above.

Problem 3

Similar to Problem 2, I had added monitoring for MySQL partitions and set the service-description to "Disk Space: MySQL". Again, sine nagiosgrapher was parsing on whitespace, it saw both "Disk" and "MySQL" and was triggering the MySQL graph plugin, which of course failed on the disk output. Changing the service-description fixed this.

Once the above changes were made, do the following:

 /etc/init.d/nagiosgrapher restart

This will begin generating the graph data correctly. Once this has been running for awhile and each graph has been generated at least once (you can verify in the logs or by looking directly in the /var/lib/nagiosgrapher/rrd/ directory), then restart Nagios:

 /etc/init.d/nagios3 restart

At this point, everything should be working fine.

For what it's worth, these are the packages I have installed that led me to this problem and solution:

ii  nagios-images                           0.7                          Collection of images and icons for the nagios system
ii  nagios-nrpe-plugin                      2.12-4                       Nagios Remote Plugin Executor Plugin
ii  nagios-nrpe-server                      2.12-4                       Nagios Remote Plugin Executor Server
ii  nagios-plugins-basic                    1.4.15-3squeeze1             Plugins for the nagios network monitoring and management system
ii  nagios-plugins-standard                 1.4.15-3squeeze1             Plugins for the nagios network monitoring and management system
ii  nagios3                                 3.2.1-2                      A host/service/network monitoring and management system
ii  nagios3-cgi                             3.2.1-2                      cgi files for nagios3
ii  nagios3-common                          3.2.1-2                      support files for nagios3
ii  nagios3-core                            3.2.1-2                      A host/service/network monitoring and management system core files
ii  nagiosgrapher                           1.7.1-2+deb60u1              Charting add-on for Nagios
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.