Skip to content

Commit 80edc33

Browse files
committed
fix(sc-event): replay status-change events after a downtime ends
1 parent b2dcaf7 commit 80edc33

16 files changed

Lines changed: 134 additions & 14 deletions

centreon-certified/canopsis/canopsis2x-events-apiv2.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,9 @@ local queue
631631
-- Fonction init()
632632
function init(conf)
633633
queue = EventQueue.new(conf)
634+
sc_event.set_pending_event_handler(function(pending_broker_event)
635+
write(pending_broker_event)
636+
end)
634637
end
635638

636639
-- --------------------------------------------------------------------------------

centreon-certified/datadog/datadog-events-apiv2.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ local queue
297297
-- Fonction init()
298298
function init(conf)
299299
queue = EventQueue.new(conf)
300+
sc_event.set_pending_event_handler(function(pending_broker_event)
301+
write(pending_broker_event)
302+
end)
300303
end
301304

302305
-- --------------------------------------------------------------------------------

centreon-certified/elasticsearch/elastic-events-apiv2.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ local queue
286286
-- Fonction init()
287287
function init(conf)
288288
queue = EventQueue.new(conf)
289+
sc_event.set_pending_event_handler(function(pending_broker_event)
290+
write(pending_broker_event)
291+
end)
289292
end
290293

291294
-- --------------------------------------------------------------------------------

centreon-certified/google/bigquery-events-apiv2.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,9 @@ local queue
384384

385385
function init(params)
386386
queue = EventQueue.new(params)
387+
sc_event.set_pending_event_handler(function(pending_broker_event)
388+
write(pending_broker_event)
389+
end)
387390
end
388391

389392
function write(event)

centreon-certified/kafka/kafka-events-apiv2.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ local queue
243243

244244
function init(params)
245245
queue = EventQueue.new(params)
246+
sc_event.set_pending_event_handler(function(pending_broker_event)
247+
write(pending_broker_event)
248+
end)
246249
end
247250

248251
-- --------------------------------------------------------------------------------

centreon-certified/keep/keep-events-apiv2.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,9 @@ local queue
471471
-- Fonction init()
472472
function init(conf)
473473
queue = EventQueue.new(conf)
474+
sc_event.set_pending_event_handler(function(pending_broker_event)
475+
write(pending_broker_event)
476+
end)
474477
end
475478

476479
-- --------------------------------------------------------------------------------

centreon-certified/logstash/logstash-events-apiv2.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ local queue
283283
-- Fonction init()
284284
function init(conf)
285285
queue = EventQueue.new(conf)
286+
sc_event.set_pending_event_handler(function(pending_broker_event)
287+
write(pending_broker_event)
288+
end)
286289
end
287290

288291
--------------------------------------------------------------------------------

centreon-certified/omi/omi_events-apiv2.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,9 @@ local queue
312312
-- Fonction init()
313313
function init(conf)
314314
queue = EventQueue.new(conf)
315+
sc_event.set_pending_event_handler(function(pending_broker_event)
316+
write(pending_broker_event)
317+
end)
315318
end
316319

317320
-- Fonction write()

centreon-certified/opsgenie/opsgenie-events-apiv2.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,9 @@ local queue
424424
-- Fonction init()
425425
function init(conf)
426426
queue = EventQueue.new(conf)
427+
sc_event.set_pending_event_handler(function(pending_broker_event)
428+
write(pending_broker_event)
429+
end)
427430
end
428431

429432
-- --------------------------------------------------------------------------------

centreon-certified/pagerduty/pagerduty-events-apiv2.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,9 @@ local queue
419419
-- Fonction init()
420420
function init(conf)
421421
queue = EventQueue.new(conf)
422+
sc_event.set_pending_event_handler(function(pending_broker_event)
423+
write(pending_broker_event)
424+
end)
422425
end
423426

424427
-- --------------------------------------------------------------------------------

0 commit comments

Comments
 (0)