Fix broken active monitoring conf export

Fixes #3892
This commit is contained in:
emanuele-f 2020-05-06 17:52:02 +02:00
parent c65ce927d5
commit 010ea26c85

View file

@ -330,11 +330,15 @@ function am_utils.getHosts(config_only, granularity)
local host = deserializeAmPrefs(host_key, val, config_only)
if host and ((granularity == nil) or (host.granularity == granularity)) then
-- Ensure that the measurement is still available
local m_info = am_utils.getMeasurementInfo(host.measurement)
if(m_info ~= nil) then
if config_only then
rv[host_key] = host
else
-- Ensure that the measurement is still available
local m_info = am_utils.getMeasurementInfo(host.measurement)
if(m_info ~= nil) then
rv[host_key] = host
end
end
end
end