Skip to content

Commit

Permalink
fix wrong mandatory param and wrong dt index (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanguyvda authored Jan 30, 2023
1 parent a494f1d commit 1766a7a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function EventQueue.new(params)
local self = {}

local mandatory_parameters = {
"params.canopsis_authkey",
"canopsis_authkey",
"canopsis_host"
}

Expand Down Expand Up @@ -330,10 +330,10 @@ function EventQueue:format_event_downtime()
}

if event.service_id then
self.sc_event.event.formated_event["entity_pattern"][0][0]["cond"]["value"] = tostring(event.cache.service.description)
self.sc_event.event.formated_event["entity_pattern"][1][1]["cond"]["value"] = tostring(event.cache.service.description)
.. "/" .. tostring(event.cache.host.name)
else
self.sc_event.event.formated_event["entity_pattern"][0][0]["cond"]["value"] = tostring(event.cache.host.name)
self.sc_event.event.formated_event["entity_pattern"][1][1]["cond"]["value"] = tostring(event.cache.host.name)
end
end
end
Expand Down

0 comments on commit 1766a7a

Please sign in to comment.