Just wrote a number of custom plugins to monitor some off-the-wall stuff we have here at work.
How can I get Nagios XI to create performance graphs for those checks? Is there a module I need to use? Most of these checks are written in bash, but a couple are in perl.
Getting plugins to
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Getting plugins to
So performance data actually comes from what the plugin parses, you will need to build in handling for it, you could take a look at some plugins from the nagios plugins package, than read up on performance data here:
https://nagios-plugins.org/doc/guidelines.html#AEN200
https://nagios-plugins.org/doc/guidelines.html#AEN200
Re: Getting plugins to
I had reviewed that, and thought I was doing that... Here is a copy of the output from one of the checks:slansing wrote:So performance data actually comes from what the plugin parses, you will need to build in handling for it, you could take a look at some plugins from the nagios plugins package, than read up on performance data here:
https://nagios-plugins.org/doc/guidelines.html#AEN200
OK - (Completed: 0.171ms) (DNS_lookup: 0.001ms) (Connect Time: 0.085ms) (SSL HandShake: 0.000ms): (302)
Or should it be more like this:
OK - Fetched: 0.171ms, DNS_lookup: 0.001ms, Connect_Time: 0.085ms, SSL_Handshake: 0.000ms, HTML 302
Re: Getting plugins to
You're missing the pipe "|" character. That is critical because it tells Nagios "Anything before this is regular output, and anything after is performance data".
The performance data needs to be formatted according to the link that slansing posted. Typically the form will be something like:
Saying that the size of whatever you are measuring is 12MB, and that a warning should be issues at 20MB and a critical at 40MB.
The performance data needs to be formatted according to the link that slansing posted. Typically the form will be something like:
Code: Select all
'size'=12MB;20;40;
Former Nagios employee
Re: Getting plugins to
Got it. That part was easy...
Thank you!
I initially started with two data points to graph, but quickly added two additional data points. The first two show up on the graph, but all four show up on the dials. Is there a way to make sure that the additional two show up on the graph?
Is there an easy way to nuke all the data I've tracked so far (basically reset the performance graph)?
Thank you!
I initially started with two data points to graph, but quickly added two additional data points. The first two show up on the graph, but all four show up on the dials. Is there a way to make sure that the additional two show up on the graph?
Is there an easy way to nuke all the data I've tracked so far (basically reset the performance graph)?
Re: Getting plugins to
What version of XI are you running? Newer versions should handle the performance data output without needing to modify any templates, but older versions required altering a PHP template for the graph.
As for resetting the data, look in /usr/local/nagios/share/perfdata and find your host directory, then delete the RRD and XML files for that particular service in that directory.
As for resetting the data, look in /usr/local/nagios/share/perfdata and find your host directory, then delete the RRD and XML files for that particular service in that directory.
Former Nagios employee
Re: Getting plugins to
We're running Nagios XI 2014R2.3tmcdonald wrote:What version of XI are you running? Newer versions should handle the performance data output without needing to modify any templates, but older versions required altering a PHP template for the graph.
UPDATE: Removing the .XML and RRD files resolved the problem. It's now graphing completely!
Thank you!!!
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Getting plugins to
If your plugin changes the quantity of datasources the RRD will fail to update unless you delete the rrd file from
/usr/local/nagios/share/perfdata/<HOST>/<SERVICE>.rrd
and let it be re-created
Or run the following procedure
http://support.nagios.com/wiki/index.ph ... 14_Upgrade
/usr/local/nagios/share/perfdata/<HOST>/<SERVICE>.rrd
and let it be re-created
Or run the following procedure
http://support.nagios.com/wiki/index.ph ... 14_Upgrade