Removing the servers from maintenance mode using nagios api

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
nsclientissue
Posts: 5
Joined: Fri Jul 03, 2020 3:50 am

Removing the servers from maintenance mode using nagios api

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Removing the servers from maintenance mode using nagios

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
nsclientissue
Posts: 5
Joined: Fri Jul 03, 2020 3:50 am

Re: Removing the servers from maintenance mode using nagios

Post by nsclientissue »

thanks for the replay,

i want to remove the servers/services from scheduled maintenance window.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Removing the servers from maintenance mode using nagios

Post by scottwilkerson »

From the Interface
Help -> API Docs -> System Reference ->
DELETE system/scheduleddowntime/<internal_id>
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
nsclientissue
Posts: 5
Joined: Fri Jul 03, 2020 3:50 am

Re: Removing the servers from maintenance mode using nagios

Post 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
nsclientissue
Posts: 5
Joined: Fri Jul 03, 2020 3:50 am

Re: Removing the servers from maintenance mode using nagios

Post by nsclientissue »

Can anyone reply pls
Locked