Page 1 of 1

Check_ifoperstatus returning too much info

Posted: Fri Jan 20, 2012 3:14 pm
by AWS
Hello.

CentOS 5, 32-bit, manual install.

When I use the check_ifoperstatus command, the Status Information line reads: check_ifoperstatus plugin for Nagios monitors operational
Image
If I click the service to view the details I get the green check mark that all is ok plus I get the help output of the command. I'd like it just to return "OK". What am I doing wrong?

Image

Running the command from the shell returns the values I would hope to see in the web page:

Code: Select all

[root@nagios libexec]# ./check_ifoperstatus -k 7 -H 10.1.1.254
OK: Interface pppoe0 (index 7) is up.[root@nagios libexec]#
* There isn't a line break after the "... is up. [root@..." like I'd expect. The result is on the same line as the prompt.

Thanks
AwS

Re: Check_ifoperstatus returning too much info

Posted: Fri Jan 20, 2012 4:30 pm
by lmiltchev
It seems like it shows you the usage, so I would assume that there is something wrong with the syntax.
Go to the Core Config Manager->Monitoring->Services->Modify. Your "Command view", under the "Common Settings" tab should look something like this:

Code: Select all

$USER1$/check_ifoperstatus -H $HOSTADDRESS$ -C $ARG1$ -k $ARG2$ 
Do you have your community string in the $ARG1$ textbox and "7" in the $ARG2$ textbox?

Re: Check_ifoperstatus returning too much info

Posted: Fri Jan 20, 2012 4:37 pm
by AWS
Another bone-head move on my part. Thanks for that solution. I had both arguments, community string and k, on the same line in $ARG1$.

Thanks again for your assistance.

AWS