mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed PagerDuty alert to show rule name + device as summary (#9213)
* Fixed PagerDuty alert to show rule name + device as summary * Update Pagerduty.php
This commit is contained in:
committed by
Tony Murray
parent
e81a1fc79d
commit
53a1730fc7
@@ -90,9 +90,10 @@ class Pagerduty extends Transport
|
||||
'event_action' => $obj['event_type'],
|
||||
'dedup_key' => $obj['uid'],
|
||||
'payload' => [
|
||||
'summary' => implode(PHP_EOL, array_column($obj['faults'], 'string')) ?: 'Test',
|
||||
'custom_details' => substr(implode(PHP_EOL, array_column($obj['faults'], 'string')), 0, 1020) . '....' ?: 'Test',
|
||||
'source' => $obj['hostname'],
|
||||
'severity' => $obj['severity'],
|
||||
'summary' => ($obj['name'] ? $obj['name'] . ' on ' . $obj['hostname'] : $obj['title']),
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user