Implemented connection failed alert (#6622)

This commit is contained in:
MatteoBiscosi 2022-05-27 10:44:22 +02:00
parent 957e0d777c
commit e9147aa37d
11 changed files with 145 additions and 0 deletions

View file

@ -5310,6 +5310,22 @@ end
-- ##############################################
-- @brief This function, given an alert and "cli" or "srv" string is going to return the formatted hostname
-- @params alert: A table with the alert infos
-- cli_srv: A string "cli" or "srv" used to get the required info
-- @return A string hostname@vlan
function format_alert_hostname(alert, cli_srv)
local host = alert[cli_srv .. "_name"]
if(isEmptyString(host)) then
host = alert[cli_srv .. "_ip"]
end
return format_ip_vlan(shortenString(host, 26), alert["vlan"])
end
-- ##############################################
--
-- IMPORTANT
-- Leave it at the end so it can use the functions