IN DEVELOPMENT
If you have a maintenance window or a scheduled outage for a device then you will likely want to suspend alerting for that device during that period.
NMIS has supported this for a long time, please refer to the NMIS Outages documentation for further information.
Now, it is also possible to manage Outages within the Administration console or API.
Summary
Operation | Method | API |
---|---|---|
Get a list of Outages | GET | http://server/en/omk/admin/api/v2/outages |
Get an Outage | GET | http://server/en/omk/admin/api/v2/outages/:id |
Create an Outage | POST | http://server/en/omk/admin/api/v2/outages |
Update an Outage | PUT | http://server/en/omk/admin/api/v2/outages |
Delete an Outage | DELETE | http://server/en/omk/admin/api/v2/outages/:id |
Authentication
All these methods require authentication.
POST http://server/en/omk/admin/login
Form data:
- username
- password
Methods
Get Outages
GET http://server/en/omk/admin/api/v2/outages
Returns a list of outages.
Response:
[ { "change_id": "ticket #", "current": "current", "description": null, "end": 1646831410, "frequency": "once", "id": "4dab2e5d-de6b-4d2f-946a-cc83edba9feb", "options": {}, "selector": { "node": { "name": "amor" } }, "start": 1646828110 }, { "change_id": "ticket #", "current": null, "description": null, "end": 1647695495, "frequency": "once", "id": "f14d4f34-2fd0-4be0-9d54-7431c5de294f", "options": {}, "selector": { "node": { "name": "asgard" } }, "start": 1647692195 } ]
Get Outage
GET http://server/en/omk/admin/api/v2/outages/#ID
Ex. http://server/en/omk/admin/api/v2/outages/f14d4f34-2fd0-4be0-9d54-7431c5de294f
Returns an outage.
Response:
{ "change_id": "ticket #", "description": null, "end": 1647695495, "frequency": "once", "id": "f14d4f34-2fd0-4be0-9d54-7431c5de294f", "options": {}, "selector": { "node": { "name": "asgard" } }, "start": 1647692195 }
Create Outage
POST http://server/en/omk/admin/api/v2/outages
Returns 201 if the outage was successfully created.
Payload example:
{ "change_id": "ticket #1234", "description": "Emergency outage", "end": "11-Mar-2022 23:21:03", "nodes": ["Asgard","apc-ups"], "start": "10-Mar-2022 23:21:03" }
Update Outage
PUT http://server/en/omk/admin/api/v2/outages
Returns 201 if the outage was successfully updated.
Payload example:
{ "change_id": "ticket #1234", "description": "Firewall updates", "end": "11-Mar-2022 23:21:03", "nodes": ["Asgard","apc-ups"], "start": "10-Mar-2022 23:21:03", "id": "9ede91fc-45c3-4538-8bbd-35ddc893a51f" }
Delete Outage
DELETE http://server/en/omk/admin/api/v2/outages/2a07c78a-65b6-49df-a052-a97d7a899c58
Returns 201 if the outage was successfully removed.