External Command CHANGE_HOST_CHECK_COMMAND fails

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Nagalakshmi
Posts: 2
Joined: Fri Sep 26, 2014 7:24 am

External Command CHANGE_HOST_CHECK_COMMAND fails

Post 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?
Last edited by Nagalakshmi on Mon Sep 29, 2014 1:44 am, edited 1 time in total.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: External Command CHANGE_HOST_CHECK_COMMAND fails

Post 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
Former Nagios employee
Nagalakshmi
Posts: 2
Joined: Fri Sep 26, 2014 7:24 am

Re: External Command CHANGE_HOST_CHECK_COMMAND fails

Post by Nagalakshmi »

Yes.. I have terminated with a newline and also added timestamp before the command. But still it shows the same error.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: External Command CHANGE_HOST_CHECK_COMMAND fails

Post 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
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: External Command CHANGE_HOST_CHECK_COMMAND fails

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: External Command CHANGE_HOST_CHECK_COMMAND fails

Post by abrist »

Do you have a follow up for us OP?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked