Removing the servers from maintenance mode using nagios api

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Removing the servers from maintenance mode using nagios api

Postby nsclientissue » Fri Jul 03, 2020 3:54 am

Hi Team,

I want to remove the hosts/associated service from maintenance mode from nagiosxi using nagios API. Can someone help on this please.
nsclientissue
 
Posts: 5
Joined: Fri Jul 03, 2020 3:50 am

Re: Removing the servers from maintenance mode using nagios

Postby scottwilkerson » Mon Jul 06, 2020 3:03 pm

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 18623
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Removing the servers from maintenance mode using nagios

Postby nsclientissue » Wed Jul 08, 2020 6:10 am

thanks for the replay,

i want to remove the servers/services from scheduled maintenance window.
nsclientissue
 
Posts: 5
Joined: Fri Jul 03, 2020 3:50 am

Re: Removing the servers from maintenance mode using nagios

Postby scottwilkerson » Wed Jul 08, 2020 6:21 am

From the Interface
Help -> API Docs -> System Reference ->
DELETE system/scheduleddowntime/<internal_id>
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 18623
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Removing the servers from maintenance mode using nagios

Postby nsclientissue » Thu Jul 09, 2020 2:32 am

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.amazonaws.com/nagiosxi/api/v1/system/scheduleddowntime/10?apikey=qRBYIO2a7tZJM4NtmfKnrtsXaZssVOOlFlDjqEMQ72v96CVL8F9CoUPCUhk65prZ&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

Postby nsclientissue » Mon Jul 13, 2020 12:30 pm

Can anyone reply pls
nsclientissue
 
Posts: 5
Joined: Fri Jul 03, 2020 3:50 am


Return to Community Support

Who is online

Users browsing this forum: dbasupport, fuitseng, MarioTad and 26 guests