OpenNMS / opennms-pagerduty-plugin

OpenNMS <-> PagerDuty
6 stars 5 forks source link

Prevent newlines from being prepended/appended to the description #6

Closed gmichels closed 3 years ago

gmichels commented 3 years ago

Plugin is sending events to PagerDuty with extra newlines prepended/appended to the description, per example below:

{
  "client": "OpenNMS",
  "client_url": "https://nms03.internal.opennms.com/opennms/alarm/detail.htm?id=864481",
  "description": "\n            Interface 64.2.142.111 is down.\n        ",
  "event_type": "trigger",
  "incident_key": "uei.opennms.org/nodes/interfaceDown::70:64.2.142.111",
  "service_key": "5e84cb63be324b8387f08ad49735f935"
}
j-white commented 3 years ago

Fixed with https://github.com/OpenNMS/opennms-pagerduty-plugin/commit/eeef5ae57fc80b513d3e094d3e7f25befc1bfad2