Fix active monitoring alert unit

This commit is contained in:
emanuele-f 2020-04-15 11:14:00 +02:00
parent 5680cb1a04
commit 1febadb5bd
4 changed files with 55 additions and 39 deletions

View file

@ -71,6 +71,13 @@ end
-- Only used for the formatting, don't use as a key as the "/"
-- character is escaped in HTTP parameters
function am_utils.formatRttHost(host, measurement)
local m_info = am_utils.getMeasurementInfo(measurement)
if m_info and m_info.force_host then
-- Only a single host is present, return it
return(host)
end
return(string.format("%s://%s", measurement, host))
end