Different result in web interface and command line
Posted: Wed Jul 02, 2014 12:05 pm
I too am getting different results from the command line than from within Nagios for my perl plugin.
From CLI I get a line of text output and an exit value of 0 when I expect to; or a different line of text output and a value of 1 when I expect to; but when I go through commands.cfg and the Nagios web interface, it always returns with exit value of 2 [critical].
My CLI is the perl script with 4 arguments:
And I have set up a service command in ../nagios/etc/objects/commands.cfg to pass the same:
With the command-line in the server's CFG file as:
Any suggestions as to what I may have wrong in this set-up?
Thanks!
From CLI I get a line of text output and an exit value of 0 when I expect to; or a different line of text output and a value of 1 when I expect to; but when I go through commands.cfg and the Nagios web interface, it always returns with exit value of 2 [critical].
My CLI is the perl script with 4 arguments:
Code: Select all
./check-crawl.pl FQDN Port# Collection status
Code: Select all
define command {
command_name crawl_status
command_line $USER1$/check_crawl.pl $ARG1$ $ARG2$ $ARG3$ $ARG4$
}
Code: Select all
check_command crawler_status!FQDN!80!Collection!status
Thanks!