Disable hosts through API - Not working?

22 views
Skip to first unread message

Kristian Strand

unread,
Apr 8, 2016, 7:42:14 AM4/8/16
to nagrestconf-users
Hi again,

While adding hosts to Nagios using NagRestConf, I have encountered a tricky problem.

Setting the host to disable:1 using the API gives me the following error:
ERROR: Status (400): ["NAGCTL ERROR: Host has one or more enabled services. Will not disable."]

But to make it more tricky; I am able to disable and enable the remote in the WebInterface of NagRestConf.
And I have made sure that the services attached to the remote are "disable friendly" or so to say

The command used:
 ./nrcq _http://localhost/rest modify/hosts -d name:test -d disable:1

Am I using the wrong command or are there other ways to disable the host?

Cheers
Kristian

Mark Clarkson

unread,
Apr 8, 2016, 7:44:54 AM4/8/16
to nagrestconf-users

Kristian Strand

unread,
Apr 8, 2016, 7:55:51 AM4/8/16
to nagrestconf-users
hehe, yeah looks like we missed some code in our API interaction here.
Thanks Mark and have a good weekend.

Regards,
Kristian

Mark Clarkson

unread,
Apr 8, 2016, 8:16:46 AM4/8/16
to nagrestconf-users
On Friday, 8 April 2016 12:55:51 UTC+1, Kristian Strand wrote:
hehe, yeah looks like we missed some code in our API interaction here.
Thanks Mark and have a good weekend.


No problem, you too!
Reply all
Reply to author
Forward
0 new messages