Hi Team,
I want to remove the hosts/associated service from maintenance mode from nagiosxi using nagios API. Can someone help on this please.
Removing the servers from maintenance mode using nagios api
-
- Posts: 5
- Joined: Fri Jul 03, 2020 3:50 am
-
- 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
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
If you acknowledged a problem it will automatically come out of that when the host/service recovers
-
- Posts: 5
- Joined: Fri Jul 03, 2020 3:50 am
Re: Removing the servers from maintenance mode using nagios
thanks for the replay,
i want to remove the servers/services from scheduled maintenance window.
i want to remove the servers/services from scheduled maintenance window.
-
- 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
From the Interface
Help -> API Docs -> System Reference ->
DELETE system/scheduleddowntime/<internal_id>
Help -> API Docs -> System Reference ->
DELETE system/scheduleddowntime/<internal_id>
-
- Posts: 5
- Joined: Fri Jul 03, 2020 3:50 am
Re: Removing the servers from maintenance mode using nagios
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
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
-
- Posts: 5
- Joined: Fri Jul 03, 2020 3:50 am
Re: Removing the servers from maintenance mode using nagios
Can anyone reply pls