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 |
Delete an Outage | DELETE | http://server/en/omk/admin/api/v2/outages |
Methods
Get
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": "123", "description": null, "end": "11-Mar-2022 23:21:03", "nodes": ["Asgard","apc-ups"], "start": "10-Mar-2022 23:21:03" }