Graphing on a custom up/down check
Graphing on a custom up/down check
Hi
Is there a graphing for dummies document
I've searched the forum, and I only found this
https://nagios-plugins.org/doc/guidelines.html#AEN78
That doesn't help me understand
I have a custom check that exits with an 1 on up and a 2 on down, and my manager wants it to graph that to give to customers
but how to do it, is not getting through to me.
are there examples in other checks, I could look at to see how it's accomplished?
thank you for any help
Is there a graphing for dummies document
I've searched the forum, and I only found this
https://nagios-plugins.org/doc/guidelines.html#AEN78
That doesn't help me understand
I have a custom check that exits with an 1 on up and a 2 on down, and my manager wants it to graph that to give to customers
but how to do it, is not getting through to me.
are there examples in other checks, I could look at to see how it's accomplished?
thank you for any help
Re: Graphing on a custom up/down check
Can you post the plugin code here? We can't do custom development without getting Sales involved, but we can point out where and how to add performance data for graphing.
Former Nagios employee
Re: Graphing on a custom up/down check
I went looking at the checks in libexec that were .sh, and I found some code to copy,
it's not what I was hoping for up or critical, but it gives me a graph that I can send to people who don't understand when the instance go down
at the top of the script
STATE_OK=2
STATE_CRITICAL=0
then we do a curl using a soap xml and looking for the word approved in the curl result
if it's found, that gives us a 1
so the exit code is
if [ $status -eq 1 ]; then
echo "OK - Instance is Responding Correctly |Connection=$STATE_OK"
exit 0
else
echo "CRITICAL - Instance is not responding correctly |Connection=$STATE_CRITICAL"
exit 2
fi
this give a constant line at 2 and when the instance is down, it drops to 0, and that graph is something end-users can understand
it's not what I was hoping for up or critical, but it gives me a graph that I can send to people who don't understand when the instance go down
at the top of the script
STATE_OK=2
STATE_CRITICAL=0
then we do a curl using a soap xml and looking for the word approved in the curl result
if it's found, that gives us a 1
so the exit code is
if [ $status -eq 1 ]; then
echo "OK - Instance is Responding Correctly |Connection=$STATE_OK"
exit 0
else
echo "CRITICAL - Instance is not responding correctly |Connection=$STATE_CRITICAL"
exit 2
fi
this give a constant line at 2 and when the instance is down, it drops to 0, and that graph is something end-users can understand
Re: Graphing on a custom up/down check
OK, let us know if you need any more help on this.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Graphing on a custom up/down check
if you have a graphing for dummies, i would really like it, that one little section just doesn't cut it.
thank you
Jen
thank you
Jen
Re: Graphing on a custom up/down check
There is not much else to it. As long as the performance data output follows the format, the system will graph it for you.
Is there anything specific you need?
Is there anything specific you need?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Graphing on a custom up/down check
an example of doing connect and critical that is better than what I came up with above
The above doesn't show critical on the chart
The above doesn't show critical on the chart
Re: Graphing on a custom up/down check
You are asking to have the Warning and Critical lines on the graph, correct?
If so, for example, you would have to change this line from
to
You would have to replace <Warning> and <Critical> in the above command with the Warning and Critical threshold options that you pass to the script.
That way, the performance data will output the thresholds and then you can display them on the graph.
If so, for example, you would have to change this line from
Code: Select all
echo "OK - Instance is Responding Correctly |Connection=$STATE_OK"Code: Select all
echo "OK - Instance is Responding Correctly |Connection=$STATE_OK";<Warning>;<Critical>;;That way, the performance data will output the thresholds and then you can display them on the graph.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Graphing on a custom up/down check
ok, thank you very much
Re: Graphing on a custom up/down check
Your welcome. Let us know if it is OK to close the post and lock it up.
Be sure to check out our Knowledgebase for helpful articles and solutions!