Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add details to the payload sent to Pager Duty #8

Open
GanimanSwift opened this issue Sep 25, 2020 · 3 comments
Open

Add details to the payload sent to Pager Duty #8

GanimanSwift opened this issue Sep 25, 2020 · 3 comments

Comments

@GanimanSwift
Copy link

It would be useful to have the ability to add more details to the payload. Something like this:

{
  "description": "Node east01.internal.opennms.com is down.",
  "event_type": "trigger",
  "incident_key": "uei.opennms.org/nodes/nodeDown::70:172.20.42.19",
  "service_key": "5e84cb63be324b8387f08ad49735f935",
  "details": {
    "value": "1",
    "team": "OpenNMS",
    "severity": "MAJOR",
    "runbook_url": "https://nhwiki.nanthealth.com/display/techops/OpenNMS+nodeDown+Response+Procedure",
    "ip": "172.20.42.19",
    "hostname": "east01.internal.opennms.com",
    "event_time": "2020.09.24 13:01:17",
    "event_id": "12345",
    "client_url": "https://nms03.internal.opennms.com/opennms/element/nodeList.htm?iplike=172.20.42.19",
    "application": "OpenNMS"
  }
}

Most of this should be easy to fill in. Some of it might require setting up some parameters, like the client_url or runbook_url. The runbook_url can be automatically generated by filling in a blank... it would like like:

https://nhwiki.nanthealth.com/display/techops/OpenNMS+<insert event name here>+Response+Procedure

@gmichels
Copy link

@j-white as a start we could grab the properties from the alarm object and dump it all as a json in the payload details. Do you think this is something that can be implemented easily?

@gmichels
Copy link

Sample payload being sent at the moment.

{
  "client": "OpenNMS",
  "client_url": "https://nms03.internal.opennms.com/opennms/alarm/detail.htm?id=871450",
  "contexts": [],
  "description": "High threshold exceeded for service SNMP metric ns-dskPercent on interface //172.20.42.26",
  "event_type": "trigger",
  "incident_key": "uei.opennms.org/threshold/highThresholdExceeded::542:172.20.42.26:ns-dskPercent:90.0:2:75.0:/",
  "service_key": "c6e2e4296d0e4afd84f751562a70a9a2",
  "details": {
    "description": "Trigger an alert when the percentage of disk space used on any disk reaches or goes above 90% full for two consecutive measurement intervals",
    "ds": "ns-dskPercent",
    "instance": "1",
    "instanceLabel": "_root_fs",
    "label": "/",
    "rearm": "75.0",
    "resourceId": "node[542].dskIndex[_root_fs]",
    "resourceType": "dskIndex",
    "threshold": "90.0",
    "trigger": "2",
    "value": "90"
  }
}

@gmichels
Copy link

Sample payload from a different monitoring system.

{
  "client": "Zabbix",
  "client_url": "https://zabbix.nanthealth.com/zabbix/tr_events.php?triggerid=1298857&eventid=262097281",
  "contexts": [],
  "description": "Free disk space low on volume (/) : PROBLEM for SCIFGITAPP01",
  "event_type": "trigger",
  "incident_key": "262097281",
  "service_key": "371db1c8af2f4402c0df9891ff988706",
  "details": {
    "application": "Infrastructure",
    "event_time": "2022.08.30 11:24:37",
    "hostname": "SCIFGITAPP01",
    "ip": "10.80.60.15",
    "operational_data": "0 %, 0 B",
    "runbook_url": "https://nhwiki.nanthealth.com/display/techops/Free+disk+space+low+Response+Procedure",
    "tags": "Environment:Production, Patching:Odds, Service:Infrastructure, Team:NOC",
    "team": "NOC",
    "trigger_description": "Low disk space on /"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants