Add Servicename to Alert Detail (#16249)

* Update functions.inc.php

* spaces

* tweaks

* tweaks

* I need to wake up

* I Like the colons
This commit is contained in:
Justin Lentz
2024-07-29 11:53:11 -05:00
committed by GitHub
parent 9f4e6cbf01
commit cc6b1acfc8

View File

@@ -736,6 +736,20 @@ function alert_details($details)
$fallback = false;
}
if (isset($tmp_alerts['service_id'])) {
$fault_detail .= "Service: <a href='" .
\LibreNMS\Util\Url::generate([
'page' => 'device',
'device' => $tmp_alerts['device_id'],
'tab' => 'services',
]) .
"'>" . $tmp_alerts['service_name'] . '</a>';
$fault_detail .= ',<br>Type: ' . $tmp_alerts['service_type'];
$fault_detail .= ',<br>Param: ' . $tmp_alerts['service_param'];
$fault_detail .= ',<br>Msg: ' . $tmp_alerts['service_message'];
$fallback = false;
}
if (isset($tmp_alerts['bgpPeer_id'])) {
// If we have a bgpPeer_id, we format the data accordingly
$fault_detail .= "BGP peer <a href='" .