We’ll soon be releasing a new feature called Maintenance Mode. This feature provides a way to put your BeezKeeper instances into “Maintenance Mode”. While in MM you instance will suppress all Incident and Alert notifications to every notification channel. Alerts and Incident will still be triggered and be visible on the dashboard regardless.
Why is this useful?
This is useful for the times when you and your team (or other teams within your organization) are performing maintenance on the network or other monitored services. You still want to monitor those resources and trigger alerts viewable on your BeezKeeper dashboard or other integrated dashboards, but you wouldn’t want to notify or page anyone on call at that time on scheduled maintenance outages.
A dashboard in maintenance mode
Enable/Disable Maintenance Mode
There are two ways to enable/disable Maintenance Mode:
- Through your Dashboard’s Server settings page as an Administrator.
- Through the API using a read/write token.
Server Settings
This method is pretty straight forward. Just navigate to Settings->Server Settings from the top-right hand side cog, and click on the toggle to enable or disable Maintenance Mode on your BeezKeeper. The effect is immediate and notifications are suppressed or allowed depending on the setting.
Maintenance Mode switch in Server Settings
API GET and POST request
GET Request:
To retrieve the current state of the Maintenance Mode setting you just make a simple GET request to the /settings/maintenance_mode
endpoint.
curl --location --request GET 'https://[HOSTNAME]/settings/maintenance_mode' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer **********'
Response:
{
"data": {
"id": "54",
"type": "setting/maintenance_mode",
"attributes": {
"enabled": true,
"enabled_at": "2024-08-23T11:39:13.000Z"
}
}
}
PUT request:
To set your server into Maintenance Mode using the API (and potentially triggered by a 3rd-party system) you’d have to do a PUT request.
curl --location --request PUT 'https://dev.netbeez.net/settings/maintenance_mode' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer **********' \
--data '{
"data": {
"id": false,
"type": "setting/maintenance_mode",
"attributes": {
"enabled": true
}
}
}'
The response would be the same as for the GET request above, reflecting the change that was just submitted.
3rd Party Integrations
One prime example of a good case for an integration is setting up ServiceNow maintenance window schedules and then having them trigger Outbound REST messages whenever the start & stop.
Here is a link to the documentation on how to create ServiceNow Outbound requests and then use that to get triggered as an action from Maintenance Windows. Unfortunately I don’t have access to ServiceNow in order to post a complete tutorial on how to do it but given the documentation and flexibility of ServiceNow, something like this should definitely be possible.
I hope this article helps in better managing your Maintenance Windows and this feature will help you focus when you need to maintain your infrastructure.
Let me know in the comments how you are going to be using this feature and what tools are you going to integrate with!