Page 1 of 1

Need Graph Explorer for custom service on a host

Posted: Thu Oct 17, 2019 3:58 pm
by rajeshkondapalli
Hi,

I can see the graphs for all generic services on a host but looking for a performance graph on a custom service written for host.

Re: Need Graph Explorer for custom service on a host

Posted: Fri Oct 18, 2019 9:45 am
by scottwilkerson
Is this service check returning performance data?
If you look at the Service detail page for this service and click the Advanced tab, is there data next to "Performance Data:"?

Re: Need Graph Explorer for custom service on a host

Posted: Sun Oct 20, 2019 10:13 am
by rajeshkondapalli
NO, it does not.

Re: Need Graph Explorer for custom service on a host

Posted: Mon Oct 21, 2019 6:55 am
by scottwilkerson
rajeshkondapalli wrote:NO, it does not.
Nagios only make performance graphs for plugins that return performance data. Not all do so, it depends on the author.

You can see the information on performance data output here
https://nagios-plugins.org/doc/guidelines.html#AEN200

Re: Need Graph Explorer for custom service on a host

Posted: Mon Oct 21, 2019 1:53 pm
by rajeshkondapalli
My custom service just spits out a "%", but still unable to get performance graph.

Re: Need Graph Explorer for custom service on a host

Posted: Mon Oct 21, 2019 2:57 pm
by scottwilkerson
rajeshkondapalli wrote:My custom service just spits out a "%", but still unable to get performance graph.
Does it follow a pipe (|) in the correct format as outlined by the link above?
Nagios 3 and newer will concatenate the parts following a "|" in a) the first line output by the plugin, and b) in the second to last line, into a string it passes to whatever performance data processing it has configured. (Note that it currently does not insert additional whitespace between both, so the plugin needs to provide some to prevent the last pair of a) and the first of b) getting run together.) Please refer to the Nagios documentation for information on how to configure such processing. However, it is the responsibility of the plugin writer to ensure the performance data is in a "Nagios Plugins" format.