mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 17:00:10 +00:00
Alternative message for speedtest execution alerts
This commit is contained in:
parent
5eff97e55b
commit
e3115e14e8
6 changed files with 29 additions and 1 deletions
|
|
@ -606,6 +606,17 @@ function am_utils.triggerAlert(numeric_ip, ip_label, current_value, upper_thresh
|
|||
local entity_info = alerts_api.amThresholdCrossEntity(ip_label)
|
||||
local type_info = amThresholdCrossType(current_value, upper_threshold, numeric_ip, granularity, entity_info)
|
||||
|
||||
if(current_value == 0) then
|
||||
-- Unreachable
|
||||
local host, measurement = key2amhost(ip_label)
|
||||
local info = am_utils.getMeasurementInfo(measurement)
|
||||
|
||||
if info and info.unreachable_alert_i18n then
|
||||
-- The measurement provides an alternative message for the alert
|
||||
type_info.alert_type_params.alt_i18n = info.unreachable_alert_i18n
|
||||
end
|
||||
end
|
||||
|
||||
return alerts_api.trigger(entity_info, type_info)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue