Skip to content

Instantly share code, notes, and snippets.

@titom73
Created June 8, 2023 09:06
Show Gist options
  • Save titom73/004741c09fdcac835baa20c83dcc1c59 to your computer and use it in GitHub Desktop.
Save titom73/004741c09fdcac835baa20c83dcc1c59 to your computer and use it in GitHub Desktop.

Webhooks

Webhook for new device

{
    "alerts": [
        {
            "annotations": {
                "description": "New device DF502B50F29141129E775AF71A350E46 was detected with Zerotouch disabled",
                "title": "New Device Detected"
            },
            "endsAt": "0001-01-01T00:00:00Z",
            "fingerprint": "4114c307bb18c9d",
            "generatorURL": "/cv/events/4114c307bb18c9d/1676539239668",
            "labels": {
                "deviceHostname": "",
                "deviceId": "DF502B50F29141129E775AF71A350E46",
                "deviceTag_device": "DF502B50F29141129E775AF71A350E46,sw-192.168.99.103,sw-192.168.99.103-DF502B50F29141129E775AF71A350E46",
                "deviceTag_eos": "4.29.1F",
                "deviceTag_eostrain": "4.29",
                "deviceTag_type": "device",
                "eventKey": "4114c307bb18c9d",
                "eventType": "SYS_DEVICE_DETECTED",
                "interfaceId": "",
                "severity": "INFO",
                "turbineId": ""
            },
            "startsAt": "2023-02-16T09:20:39.668477065Z",
            "status": "firing"
        }
    ],
    "commonAnnotations": {
        "description": "New device DF502B50F29141129E775AF71A350E46 was detected with Zerotouch disabled",
        "title": "New Device Detected"
    },
    "commonLabels": {
        "deviceHostname": "",
        "deviceId": "DF502B50F29141129E775AF71A350E46",
        "deviceTag_device": "DF502B50F29141129E775AF71A350E46,sw-192.168.99.103,sw-192.168.99.103-DF502B50F29141129E775AF71A350E46",
        "deviceTag_eos": "4.29.1F",
        "deviceTag_eostrain": "4.29",
        "deviceTag_type": "device",
        "eventKey": "4114c307bb18c9d",
        "eventType": "SYS_DEVICE_DETECTED",
        "interfaceId": "",
        "severity": "INFO",
        "turbineId": ""
    },
    "externalURL": "/cv/events",
    "groupKey": "",
    "groupLabels": {},
    "receiver": "Docker_webhook",
    "status": "firing",
    "truncatedAlerts": 0,
    "version": "4"
}
10.73.1.238 - - [16/Feb/2023 09:22:19] "POST /receiver HTTP/1.1" 200 -

Change control Succeeded

{
    "alerts": [
        {
            "annotations": {
                "description": "Change Control 'Change 20230216_102457' executed by user tom successfully updated 1 devices (DF502B50F29141129E775AF71A350E46)",
                "title": "Change Control 'Change 20230216_102457' succeeded"
            },
            "endsAt": "0001-01-01T00:00:00Z",
            "fingerprint": "790b5c0596249fe7",
            "generatorURL": "/cv/events/790b5c0596249fe7/1676539520964",
            "labels": {
                "deviceHostname": "sw-192.168.99.103",
                "deviceId": "DF502B50F29141129E775AF71A350E46",
                "deviceTag_Container": "ATD_LAB,Tenant",
                "deviceTag_bgp": "disabled",
                "deviceTag_device": "DF502B50F29141129E775AF71A350E46,sw-192.168.99.103,sw-192.168.99.103-DF502B50F29141129E775AF71A350E46",
                "deviceTag_eos": "4.29.1F",
                "deviceTag_eostrain": "4.29",
                "deviceTag_hostname": "sw-192.168.99.103",
                "deviceTag_model": "vEOS-lab",
                "deviceTag_mpls": "false",
                "deviceTag_serialnumber": "DF502B50F29141129E775AF71A350E46",
                "deviceTag_systype": "fixed",
                "deviceTag_tapagg": "none",
                "deviceTag_terminattr": "v1.24.2",
                "deviceTag_topology_network_type": "datacenter",
                "deviceTag_type": "device",
                "deviceTag_ztp": "true",
                "eventKey": "790b5c0596249fe7",
                "eventType": "CHANGE_CONTROL_SUCCESS",
                "interfaceId": "",
                "severity": "INFO",
                "turbineId": ""
            },
            "startsAt": "2023-02-16T09:25:20.964463902Z",
            "status": "firing"
        }
    ],
    "commonAnnotations": {
        "description": "Change Control 'Change 20230216_102457' executed by user tom successfully updated 1 devices (DF502B50F29141129E775AF71A350E46)",
        "title": "Change Control 'Change 20230216_102457' succeeded"
    },
    "commonLabels": {
        "deviceHostname": "sw-192.168.99.103",
        "deviceId": "DF502B50F29141129E775AF71A350E46",
        "deviceTag_Container": "ATD_LAB,Tenant",
        "deviceTag_bgp": "disabled",
        "deviceTag_device": "DF502B50F29141129E775AF71A350E46,sw-192.168.99.103,sw-192.168.99.103-DF502B50F29141129E775AF71A350E46",
        "deviceTag_eos": "4.29.1F",
        "deviceTag_eostrain": "4.29",
        "deviceTag_hostname": "sw-192.168.99.103",
        "deviceTag_model": "vEOS-lab",
        "deviceTag_mpls": "false",
        "deviceTag_serialnumber": "DF502B50F29141129E775AF71A350E46",
        "deviceTag_systype": "fixed",
        "deviceTag_tapagg": "none",
        "deviceTag_terminattr": "v1.24.2",
        "deviceTag_topology_network_type": "datacenter",
        "deviceTag_type": "device",
        "deviceTag_ztp": "true",
        "eventKey": "790b5c0596249fe7",
        "eventType": "CHANGE_CONTROL_SUCCESS",
        "interfaceId": "",
        "severity": "INFO",
        "turbineId": ""
    },
    "externalURL": "/cv/events",
    "groupKey": "",
    "groupLabels": {},
    "receiver": "Docker_webhook",
    "status": "firing",
    "truncatedAlerts": 0,
    "version": "4"
}
10.73.1.238 - - [16/Feb/2023 09:26:34] "POST /receiver HTTP/1.1" 200 -

Change control Failure

10.73.1.238 - - [16/Feb/2023 09:29:06] "POST /receiver HTTP/1.1" 200 -
{
    "alerts": [
        {
            "annotations": {
                "description": "This is a test alert. Please disregard.",
                "title": "Test alert: Change Control Failed"
            },
            "endsAt": "0001-01-01T00:00:00Z",
            "fingerprint": "[1676539700759,\"INFO\",\"CHANGE_CONTROL_FAILURE\",\"DF502B50F29141129E775AF71A350E46\"]",
            "generatorURL": "/cv/event-alerts/status",
            "labels": {
                "deviceHostname": "sw-192.168.99.103",
                "deviceId": "DF502B50F29141129E775AF71A350E46",
                "deviceTag_Container": "ATD_LAB,Tenant",
                "deviceTag_bgp": "disabled",
                "deviceTag_device": "DF502B50F29141129E775AF71A350E46,sw-192.168.99.103,sw-192.168.99.103-DF502B50F29141129E775AF71A350E46",
                "deviceTag_eos": "4.29.1F",
                "deviceTag_eostrain": "4.29",
                "deviceTag_hostname": "sw-192.168.99.103",
                "deviceTag_model": "vEOS-lab",
                "deviceTag_mpls": "false",
                "deviceTag_serialnumber": "DF502B50F29141129E775AF71A350E46",
                "deviceTag_systype": "fixed",
                "deviceTag_tapagg": "none",
                "deviceTag_terminattr": "v1.24.2",
                "deviceTag_topology_network_type": "datacenter",
                "deviceTag_type": "device",
                "deviceTag_ztp": "true",
                "eventKey": "[1676539700759,\"INFO\",\"CHANGE_CONTROL_FAILURE\",\"DF502B50F29141129E775AF71A350E46\"]",
                "eventType": "CHANGE_CONTROL_FAILURE",
                "interfaceId": "",
                "severity": "INFO",
                "turbineId": ""
            },
            "startsAt": "2023-02-16T09:28:20.759Z",
            "status": "firing"
        }
    ],
    "commonAnnotations": {
        "description": "This is a test alert. Please disregard.",
        "title": "Test alert: Change Control Failed"
    },
    "commonLabels": {
        "deviceHostname": "sw-192.168.99.103",
        "deviceId": "DF502B50F29141129E775AF71A350E46",
        "deviceTag_Container": "ATD_LAB,Tenant",
        "deviceTag_bgp": "disabled",
        "deviceTag_device": "DF502B50F29141129E775AF71A350E46,sw-192.168.99.103,sw-192.168.99.103-DF502B50F29141129E775AF71A350E46",
        "deviceTag_eos": "4.29.1F",
        "deviceTag_eostrain": "4.29",
        "deviceTag_hostname": "sw-192.168.99.103",
        "deviceTag_model": "vEOS-lab",
        "deviceTag_mpls": "false",
        "deviceTag_serialnumber": "DF502B50F29141129E775AF71A350E46",
        "deviceTag_systype": "fixed",
        "deviceTag_tapagg": "none",
        "deviceTag_terminattr": "v1.24.2",
        "deviceTag_topology_network_type": "datacenter",
        "deviceTag_type": "device",
        "deviceTag_ztp": "true",
        "eventKey": "[1676539700759,\"INFO\",\"CHANGE_CONTROL_FAILURE\",\"DF502B50F29141129E775AF71A350E46\"]",
        "eventType": "CHANGE_CONTROL_FAILURE",
        "interfaceId": "",
        "severity": "INFO",
        "turbineId": ""
    },
    "externalURL": "/cv/events",
    "groupKey": "",
    "groupLabels": {},
    "receiver": "Docker_webhook",
    "status": "firing",
    "truncatedAlerts": 0,
    "version": "4"
}
10.73.1.238 - - [16/Feb/2023 09:29:51] "POST /receiver HTTP/1.1" 200 -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment