mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Implemented connection failed alert (#6622)
This commit is contained in:
parent
957e0d777c
commit
e9147aa37d
11 changed files with 145 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue