Trigger External Host alerts directly from Lua (also for inactive hosts) (fix #7170)

This commit is contained in:
Alfredo Cardigliano 2023-04-21 18:20:14 +02:00
parent 2ec229a8c5
commit 64ab8b6bae
3 changed files with 25 additions and 10 deletions

View file

@ -33,11 +33,12 @@ host_alert_external_script.meta = {
-- @param one_param The first alert param
-- @param another_param The second alert param
-- @return A table with the alert built
function host_alert_external_script:init(metric, value, operator, threshold)
-- Call the parent constructor
function host_alert_external_script:init(message)
self.super:init()
self.alert_type_params = alert_creators.createThresholdCross(metric, value, operator, threshold)
self.alert_type_params = {
message = message
}
end
-- #######################################################