How can I get the following script to graph data?
root@rdbt3024 # more check_informix_maxconn_sdr.sh
#!/bin/ksh -
#
# Informix IDS
#
# Usage: check_informix_maxconn_sdr.sh
#
#
INFORMIXDIR=/usr/informix
INFORMIXSERVER=sdrsrvnet
ONCONFIG=onconfig.sdr
export INFORMIXDIR INFORMIXSERVER ONCONFIG
PROGDIR='/opt/nagios/libexec/'
$PROGDIR./check_informix_maxconn.sh -w 300 -c 400
Graph data
Re: Graph data
I would recommend reviewing the "Nagios Plugin Development Guidelines":
https://nagios-plugins.org/doc/guidelines.html#AEN200
What is the output that you see when you run your check from the command line?
https://nagios-plugins.org/doc/guidelines.html#AEN200
What is the output that you see when you run your check from the command line?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Graph data
Here is what the output looks like:
OK: Max connections= 13
OK: Max connections= 13
Re: Graph data
You will want to adjust your output accordingly. As you can see this result of a check_http for example -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. This is the expected format:
'label'=value[UOM];[warn];[crit];[min];[max]
Code: Select all
[root@localhost libexec]# ./check_http -H google.com
HTTP OK: HTTP/1.1 301 Moved Permanently - 559 bytes in 3.156 second response time |time=3.156087s;;;0.000000 size=559B;;;0
Former Nagios Employee