needing to get perfdata working for a custom plugin ...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
katieKatiePants
Posts: 51
Joined: Mon Feb 24, 2020 12:37 pm

needing to get perfdata working for a custom plugin ...

Post by katieKatiePants »

and looking for some documentation / simple examples. i already have my custom plugins working all gangbusters, now the need has finally arisen to start graphing some custom perfdata. where to go / which docos?

thx,
k

additional info:
1. using check_ncpa on nagiosxi server and custom plugins are deployed to the monitored hosts.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: needing to get perfdata working for a custom plugin ...

Post by benjaminsmith »

Hi @katieKatiePants

What kind of plugin did you write? You'll find the performance data specs on the page below. If the plugin returns performance data in the correct format it will be automatically processed by PNP.

Nagios Plugins Development Guidelines

This page is pretty helpful for understanding how performance data works in Nagios XI.

Nagios XI - Performance Data Architecture

Let us know if you get it working.

Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
katieKatiePants
Posts: 51
Joined: Mon Feb 24, 2020 12:37 pm

Re: needing to get perfdata working for a custom plugin ...

Post by katieKatiePants »

sweet mother hubbard. give katie a firm place to stand and healthy documentation ... she can move the whole universe!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: needing to get perfdata working for a custom plugin ...

Post by benjaminsmith »

sweet mother hubbard. give katie a firm place to stand and healthy documentation ... she can move the whole universe!
Excellent!

Good luck with the perf data on this project.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
katieKatiePants
Posts: 51
Joined: Mon Feb 24, 2020 12:37 pm

Re: needing to get perfdata working for a custom plugin ...

Post by katieKatiePants »

hello nagiods! got my perfdata project started but getting "integer expression expected: regardless of how i modify the perf data output.
current output from the host:

Code: Select all

superDuper@ip-10-41-1-66 plugins]# ./askForESFilesOpen
CurrentFilesOpen OK | currFilesOpen=44
current output from my xiserver:

Code: Select all

superDuper@nagiosXIServer libexec]$ ./check_ncpa.py -H 10.10.10.10 -M 'plugins/askForESFilesOpen'
/usr/local/ncpa/plugins/askForESFilesOpen: line 38: [: : integer expression expected
i've been reading this: https://nagios-plugins.org/doc/guidelines.html#AEN200 especially the portion labeled "performance data"
frankly, i'm not really smart enough to understand the documentation line:
This is the expected format:
'label'=value[UOM];[warn];[crit];[min];[max]
think you universal masters could hook me with an example of ^^?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: needing to get perfdata working for a custom plugin ...

Post by benjaminsmith »

Hi @katieKatiePants,

The first output looks right to me, but the second output suggests the script is comparing non-integer values and this is causing an error. If you want, please PM the script and I can review it for you.

Regarding performance graph output, yeah it's a little confusing. The performance graph is optional and not required for a plugin, and should following those guidelines:
This is the expected format:
'label'=value[UOM];[warn];[crit];[min];[max]
The first field is the label followed by the output from the check followed with the unit of measurement , for example:

Code: Select all

mycheck=50%
The warn and crit fields are the thresholds passed to the plugin. Those will be added to the graph so you can view the output in the graph as it relates to the thresholds set at that time. For this to fully work, make sure this is turned on in the GUI. Go to Admin > System Settings > Theme & Display and select the following.
warning-critical-lines.png
The min and max fields would be computed by the plugin and not commonly used. Let me know if that helps answer your question.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked