Commands Syntax Help
Posted: Fri Mar 07, 2014 10:12 am
I'm having some issues implementing a check_graphite plugin.
I have defined this in my commands file.
I'm trying to execute this against a url like this
When I run the test check command, this is the output.
I've tried escaping the & where it stops processing the URL, no luck. I've tried single / double quotes around the $ARG1% in the command.cfg and when defining the service check.
Running this manually against the command line works fine.
What am I doing wrong?
Thanks in advance =)
EDIT: Had to update the post and properly classify some lines as CODE because of literal http interpretations on the forum software.
I have defined this in my commands file.
Code: Select all
define command {
command_name check_graphite
command_line $USER1$/check_graphite -u $ARG1$ -w $ARG2$ -c $ARG3$ -f $ARG3$
}Code: Select all
http://metrics.lan.infinitedatastream.net/render/?target=sumSeries(app.tusko.tusko_custom_parser.jmpt_loader.*)&from=-28hours&format=jsonCode: Select all
COMMAND: /usr/local/nagios/libexec/check_graphite -u \"http://metrics.lan.infinitedatastream.net/render/\?target=sumSeries\(app.tusko.tusko_custom_parser.jmpt_loader.\*\) -w 1500:6000 -c 1000:8000 -f last
OUTPUT: Running this manually against the command line works fine.
Code: Select all
[root@nagman libexec]# /usr/local/nagios/libexec/check_graphite -u "http://metrics.lan.infinitedatastream.net/render/?target=sumSeries(app.tusko.tusko_custom_parser.jmpt_loader.*)&from=-28hours&format=json" -w 1500:6000 -c 1000:8000 -f last
check_graphite WARNING: last 6156.0 outside threshold (1500.0,6000.0) for URL: http://metrics.lan.infinitedatastream.net/render/?target=sumSeries(app.tusko.tusko_custom_parser.jmpt_loader.*)&from=-28hours&format=json
Thanks in advance =)
EDIT: Had to update the post and properly classify some lines as CODE because of literal http interpretations on the forum software.