Skip to content

Commit

Permalink
Merge pull request #22 from moolitayer/prometheus_alerts
Browse files Browse the repository at this point in the history
Prometheus alerts
  • Loading branch information
simon3z authored Oct 16, 2017
2 parents bc23105 + 4c4a061 commit 6e4117e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/models/manageiq/providers/openshift/monitoring_manager.rb
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class ManageIQ::Providers::Openshift::MonitoringManager::EventCatcher::Runner < ManageIQ::Providers::BaseManager::EventCatcher::Runner
include ManageIQ::Providers::Kubernetes::MonitoringManager::EventCatcher::RunnerMixin
end
2 changes: 2 additions & 0 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down

0 comments on commit 6e4117e

Please sign in to comment.