Page 1 of 1

External Command CHANGE_HOST_CHECK_COMMAND fails

Posted: Fri Sep 26, 2014 8:01 am
by Nagalakshmi
Hi,
I'm using Nagios 4.0.6.
I tried with changing the check command of a host using nagios external command CHANGE_HOST_CHECK_COMMAND. But it is showing "Error: External command failed -> CHANGE_HOST_CHECK_COMMAND;localhost;check_tcp!22". I also tried with changing the service check. But it is also unsuccessful showing "Error: External command failed -> CHANGE_SVC_CHECK_COMMAND;localhost;SSH;check_SSH!70!90". There are no other traces of reason for this error.

Anybody having idea of why it failed?

Re: External Command CHANGE_HOST_CHECK_COMMAND fails

Posted: Fri Sep 26, 2014 9:54 am
by tmcdonald
How are you submitting the command? Is it terminated with a newline? Are you making sure to put the timestamp before the command?

http://old.nagios.org/developerinfo/ext ... and_id=107

Re: External Command CHANGE_HOST_CHECK_COMMAND fails

Posted: Mon Sep 29, 2014 1:32 am
by Nagalakshmi
Yes.. I have terminated with a newline and also added timestamp before the command. But still it shows the same error.

Re: External Command CHANGE_HOST_CHECK_COMMAND fails

Posted: Mon Sep 29, 2014 1:54 pm
by sreinhardt
Do you have a regular file as the command pipe, or a proper command pipe?

Code: Select all

ls -lva /usr/local/nagios/var/rw/nagios.cmd

Re: External Command CHANGE_HOST_CHECK_COMMAND fails

Posted: Mon Sep 29, 2014 1:57 pm
by eloyd
Can you show us a specific example of what you're putting into the command pipe? I'd like to see the format and specific date stamp.

Re: External Command CHANGE_HOST_CHECK_COMMAND fails

Posted: Tue Sep 30, 2014 10:37 am
by abrist
Do you have a follow up for us OP?