Page 1 of 1

Removing the servers from maintenance mode using nagios api

Posted: Fri Jul 03, 2020 3:54 am
by nsclientissue
Hi Team,

I want to remove the hosts/associated service from maintenance mode from nagiosxi using nagios API. Can someone help on this please.

Re: Removing the servers from maintenance mode using nagios

Posted: Mon Jul 06, 2020 3:03 pm
by scottwilkerson
What exactly do you mean by "maintenance mode"?

If you acknowledged a problem it will automatically come out of that when the host/service recovers

Re: Removing the servers from maintenance mode using nagios

Posted: Wed Jul 08, 2020 6:10 am
by nsclientissue
thanks for the replay,

i want to remove the servers/services from scheduled maintenance window.

Re: Removing the servers from maintenance mode using nagios

Posted: Wed Jul 08, 2020 6:21 am
by scottwilkerson
From the Interface
Help -> API Docs -> System Reference ->
DELETE system/scheduleddowntime/<internal_id>

Re: Removing the servers from maintenance mode using nagios

Posted: Thu Jul 09, 2020 2:32 am
by nsclientissue
I can see the API but how to use that API. Could you please help if possible.


root@ip-172-31-33-63:~# curl -XDELETE "http://ec2-54-166-169-21.compute-1.amaz ... Z&pretty=1"
{
"success": "Remove downtime command(s) sent successfully."
}


But if i want to remove the bulk of hosts which are in scheduled downtime. Its showing that all removed but not removed. But my concern in i want to remove the selected hosts. Can you please help on how to remove.

Here i can see required parameter is internal ID, but internal ID's are showing for services. I want to remove the hosts along with services. Can you please help

Re: Removing the servers from maintenance mode using nagios

Posted: Mon Jul 13, 2020 12:30 pm
by nsclientissue
Can anyone reply pls