Pagerduty Device Groups & Simple Install Flow

Hi All,

I’m trying to get Librenms sending device groups to Pagerduty so we can route incidents based on device roles but Librenms doesn’t appear to be sending that field to Pagerduty. Is there something special I need to do?

Example of event received by PD:
{
“contexts”: [],
“description”: “CVC passing no traffic on XXX”,
“event_type”: “trigger”,
“incident_key”: “14759”,
“service_key”: “XXXX”,
“details”: "Alert for device XXX - CVC passing no traffic
Severity: critical
Timestamp: 2021-08-27 09:12:30
Unique-ID: 232731
Rule: CVC passing no traffic
Faults:
#1: sysObjectID = .1.3.6.1.4.1.2636.1.1.1.2.57; sysDescr = Juniper Networks, Inc. mx80 internet
router, kernel JUNOS 19.4R3.11, Build date: 2020-10-08 21:43:24 UTC Copyright (c) 1996-2020 Juniper Networks, Inc.; location_id = 23; port_id = 7286449; ifDescr = xe-0/0/3.2106;
Alert sent to:
"
}

I have also tried deleting and recreating the pagerduty transport but PagerDuty is demanding that I use Simple Install Flow which doesn’t seem to work.

[email protected]:~$ ./validate.php 
====================================
Component | Version
--------- | -------
LibreNMS  | 21.8.0
DB Schema | 2021_08_04_102914_add_syslog_indexes (213)
PHP       | 7.3.27-9+ubuntu16.04.1+deb.sury.org+1
Python    | 3.5.2
MySQL     | 8.0.20
RRDTool   | 1.5.5
SNMP      | NET-SNMP 5.7.3
====================================

[OK]    Composer Version: 2.1.6
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct
[FAIL]  You have no timezone set for php.
	[FIX]: 
	https://php.net/manual/en/datetime.configuration.php#ini.date.timezone
[email protected]:~$

So you would like to pass all device groups of the device to the transport and then use event rules to route the alert? In my case creating multiple PD services and managing the alert rules and transports in NMS worked fine. Some devices would alert to different transports depending on the physical location or role of the device in the network. Then in PD you can create custom logic with escalation rules to alert certain group of people and escalate the alert.

Simple install flow has not worked in a while and would probably need a support ticket to be activated again. But it does not differ from using the API keys at all - just create the integration endpoint in the PD, select LibreNMS and copy paste the key. Using or not using simple install flow does not affect the transport itself.

The real issue with the groups is probably that the field name has changed. Just updated my local installation and changing the field name seems to allow this data to be transferred.
https://developer.pagerduty.com/docs/events-api-v2/trigger-events/

Could you test it with this patch? https://github.com/librenms/librenms/pull/13235
The field ‘group’ is a string in an array format. [“group1”, “group2”]. You should be able to use event rules to match if the field contains the groupname you are interested in.