Issues with New PagerDuty Transport

Hi all,

I’m having some issues with the new PagerDuty transport. Specifically how it formats the alerts. The old transport used to set the description of the alert to the actual title of the alert making it easy to figure out what the alert was for. The new transport is setting the description to output the fault which doesn’t really say what happened.

For example, old:

{
  "client": "LibreNMS",
  "description": "Port utilisation over threshold on <hostname>",
  "event_type": "trigger",
  "incident_key": "21339",
  "service_key": "<snip>",
  "details": [
    "port_id = 515018; ifDescr = irb.1314; "
  ]
}

New (port down alert):

{
  "description": "sysObjectID = .1.3.6.1.4.1.2636.1.1.1.2.134; sysDescr = Juniper Networks, Inc. srx320 internet router, kernel JUNOS 15.1X49-D60.7, Build date: 2016-09-13 23:25:07 UTC Copyright (c) 1996-2016 Juniper Networks, Inc.; port_id = 518097; ifDescr = vlan; ",
  "event_type": "trigger",
  "incident_key": "21883",
  "service_key": "<snip>"
}

I thought initially this might be because our alert templates are coded in HTML, so I tried setting this before the HTML section, but that didn’t seem to fix.

@if ($alert->transport == pagerduty)
{{ $alert->title }}
Severity: {{ $alert->severity }}
@if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif
Timestamp: {{ $alert->timestamp }}
Unique-ID: {{ $alert->uid }}
Rule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif
@if ($alert->faults) Faults:
@foreach ($alert->faults as $key => $value)
  {{ $key }}: {{ $value['string'] }}
@endforeach
@endif
@else

Anyone have any ideas?

Thanks!

That looks like your LibreNMS is using default template.

Check your template to rule mapping is correct.

@TheGreatDoc I can confirm that the template to rule mapping is correct. Our template “Ports Up/Down Alert” maps to rule “Port status up/down”. Still having the same issue.

Thanks!

Your install is out of date, this was fixed a day or two ago.

Thanks @laf I can confirm is working correctly after updating.