mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Alertmanager Striptag Dynamic Variables (#16141)
This commit is contained in:
@@ -59,9 +59,9 @@ class Alertmanager extends Transport
|
|||||||
foreach ($alertmanager_opts as $label => $value) {
|
foreach ($alertmanager_opts as $label => $value) {
|
||||||
// To allow dynamic values
|
// To allow dynamic values
|
||||||
if (preg_match('/^extra_[A-Za-z0-9_]+$/', $label) && ! empty($alert_data['faults'][1][$value])) {
|
if (preg_match('/^extra_[A-Za-z0-9_]+$/', $label) && ! empty($alert_data['faults'][1][$value])) {
|
||||||
$data[0]['labels'][$label] = $alert_data['faults'][1][$value];
|
$data[0]['labels'][$label] = strip_tags($alert_data['faults'][1][$value]);
|
||||||
} else {
|
} else {
|
||||||
$data[0]['labels'][$label] = $value;
|
$data[0]['labels'][$label] = strip_tags($value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user