Fixes device tag not working with timeseries

This commit is contained in:
MatteoBiscosi 2023-01-24 12:36:32 +01:00
parent 7954b0295b
commit ee36cf24f3
2 changed files with 15 additions and 1 deletions

View file

@ -1072,6 +1072,16 @@ local function validateZoom(zoom)
end
end
-- ##############################################
-- @brief Returns true if inputstr is a Mac or all string
local function validateDevice(inputstr)
return (validateDeviceOrAll(inputstr) or validateIPV4(inputstr))
end
http_lint.validateDevice = validateDevice
-- ##############################################
local function validateCategory(cat)
if starts(cat, "cat_") then
local id = split(cat, "cat_")[2]
@ -1631,7 +1641,7 @@ local known_parameters = {
["alert_generation"] = { jsonCleanup, validateJSON },
-- EXCLUDE DEVICES
["device"] = validateDeviceOrAll,
["device"] = validateDevice,
["mac_list"] = validateUnquoted,
["mac_alias"] = validateSingleWord,
["mac_status"] = validateStatus,