Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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. 

...

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/v3/outages

Returns a list of outages.

...

Code Block
[
    {
        "change_id": "123456ticket #1234",
        "current": "current",
        "description": "testingEmergency 123456outage",
        "endelement": [
1683381540,         "frequency": "once",  {
      "id": "df0affe5-a16f-4fa2-a299-5376a3fabb73",         "nodeselement_name": {
            "groupVlan2":,
[                "node_name": "HQDevSwitch-1"
            ]},
            "name":{
[                 "Switch-1"
"element_name": "regex:^Vlan.*?$",
           ],             "nodeStatus"node_name": ["Switch-2"
                "reachable"
}
           ],
            "nodeTypeend": [1684156863,
                "switch"frequency": "once",
                "server"id": "0ea7644e-b6fa-4fa2-9b33-a86b79db21a4",
                "generic"
"nodes": {
           ],             "nodeVendor"name": [
                "Cisco Systems"
            ],
        Switch-2",
   "roleType": [                 "test2"Switch-1"
            ]
        },
        "options": {
            "nostats": 0
        },
        "start": 16831224001683811263
    },
    {
        "change_id": "1Outage_123_AT_OPTESTS",
        "current": "current"null,
        "description": "test-Emergency outage",
        "end": 16833815401683825925,
        "frequency": "once",
        "id": "10d3558dea7a3a94-1819f056-4492432f-8ff591c5-a5629663e0d79f39eee7c706",
        "nodes": {
            "name": [
                "fullaasgard",
            ]    "apc-ups"
    },        ]
   "options": {    },
        "nostatsoptions": 0
        {},
        "start": 16831224001646918463
    }
]



Get Outage

GET http://server/en/omk/admin/api/v3/outages/#ID

Ex. http://server/en/omk/admin/api/v3/outages/e6d371a00ea7644e-2b74b6fa-4dd34fa2-9bc99b33-fca14f8ddc4fa86b79db21a4

Returns an outage.

Response:

...

Code Block
{
    "change_id": "ticket #1234",
    "current": "current",
    "description": "Emergency outage",
    "element": [
        {
            "element_name": "Vlan2",
            "node_name": "Switch-1"
        },
        {
            "element_name": "regex:^Vlan.*?$",
            "node_name": "Switch-2"
        }
    ],
    "end": 16470048631684156863,
    "frequency": "once",
    "id": "8b46a6f60ea7644e-1b0db6fa-4e464fa2-a0819b33-d58731abbdf7a86b79db21a4",
    "nodes": {
        "name": [
            "Switch-2",
            "Switch-1"
        ]
    },
    "options": {},
    "start": 16469184631683811263
}



Create Outage

POST http://server/en/omk/admin/api/v3/outages

...

Code Block
{
    "change_id": "ticket #1234",
    "description": "Emergency outage",
    "nodes": ["Switch-2","Switch-1"],
    "elements" : [
        {  "node_name": "Switch-1",
           "element_name" : "Vlan2"
        },
        {  "node_name": "Switch-2",
           "element_name" : "regex:^Vlan.*?$"
        }
    ],
    "start": "1011-MarMay-20222023 23:21:03",
    "end": "1115-MarMay-20222023 23:21:03"
}


Returns:

Code Block
{
    "id": "8b46a6f60ea7644e-1b0db6fa-4e464fa2-a0819b33-d58731abbdf7a86b79db21a4",
    "success": 1
}

Update Outage

...

Code Block
{
    "change_id": "ticket #1234",
    "description": "Emergency outage",
    "nodes": ["Switch-2","Switch-1"],
    "elements" : [
        {  "node_name": "Switch-1",
           "element_name" : "Vlan22Vlan222"
        },
        {  "node_name": "Switch-2",
           "element_name" : "regex:^Vlan.*?$"
        }
    ],
    "start": "1011-MarMay-20222023 23:21:03",
    "end": "1115-MarMay-20222023 23:21:03"
}


Return 

Code Block
{
    "id": "8b46a6f60ea7644e-1b0db6fa-4e464fa2-a0819b33-d58731abbdf7a86b79db21a4",
    "success": 1
}



Delete Outage

DELETE http://server/en/omk/admin/api/v3/outages/8b46a6f60ea7644e-1b0db6fa-4e464fa2-a0819b33-d58731abbdf7a86b79db21a4

Returns 200 if the outage was successfully removed.

...