diff --git a/app/models/manageiq/providers/openshift/monitoring_manager.rb b/app/models/manageiq/providers/openshift/monitoring_manager.rb index 4745c44b..d7f7774f 100644 --- a/app/models/manageiq/providers/openshift/monitoring_manager.rb +++ b/app/models/manageiq/providers/openshift/monitoring_manager.rb @@ -1,5 +1,6 @@ module ManageIQ::Providers class Openshift::MonitoringManager < ManageIQ::Providers::MonitoringManager + require_nested :EventCatcher include ManageIQ::Providers::Kubernetes::MonitoringManagerMixin belongs_to :parent_manager, @@ -14,5 +15,9 @@ def self.ems_type def self.description @description ||= "Openshift Monitor".freeze end + + def self.event_monitor_class + ManageIQ::Providers::Openshift::MonitoringManager::EventCatcher + end end end diff --git a/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher.rb b/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher.rb new file mode 100644 index 00000000..6dc84763 --- /dev/null +++ b/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher.rb @@ -0,0 +1,11 @@ +class ManageIQ::Providers::Openshift::MonitoringManager::EventCatcher < ManageIQ::Providers::BaseManager::EventCatcher + require_nested :Runner + + def self.ems_class + ManageIQ::Providers::Openshift::MonitoringManager + end + + def self.settings_name + :event_catcher_prometheus + end +end diff --git a/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher/runner.rb b/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher/runner.rb new file mode 100644 index 00000000..9e305339 --- /dev/null +++ b/app/models/manageiq/providers/openshift/monitoring_manager/event_catcher/runner.rb @@ -0,0 +1,3 @@ +class ManageIQ::Providers::Openshift::MonitoringManager::EventCatcher::Runner < ManageIQ::Providers::BaseManager::EventCatcher::Runner + include ManageIQ::Providers::Kubernetes::MonitoringManager::EventCatcher::RunnerMixin +end diff --git a/config/settings.yml b/config/settings.yml index 2a5c9cd9..702e50f7 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -23,6 +23,8 @@ :event_catcher: :event_catcher_openshift: :poll: 1.seconds + :event_catcher_prometheus: + :poll: 20.seconds :queue_worker_base: :ems_metrics_collector_worker: :ems_metrics_collector_worker_openshift: {}