pagerduty transport uses template message (#11459)

This commit is contained in:
Heath Barnhart
2020-04-21 16:48:23 -05:00
committed by GitHub
parent c917de6fe1
commit 10660261df

View File

@@ -59,7 +59,7 @@ class Pagerduty extends Transport
'event_action' => $obj['event_type'],
'dedup_key' => (string)$obj['alert_id'],
'payload' => [
'custom_details' => substr(implode(PHP_EOL, array_column($obj['faults'], 'string')), 0, 1020) . '....' ?: 'Test',
'custom_details' => strip_tags($obj['msg']) ?: 'Test',
'source' => $obj['hostname'],
'severity' => $obj['severity'],
'summary' => ($obj['name'] ? $obj['name'] . ' on ' . $obj['hostname'] : $obj['title']),