diff --git a/README.md b/README.md index d7c5533..322c17b 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ Attributes Data Bags --------- -A simple data bag item named hosts in node[:mon_notification][:data_bag] is required for running. It simply has 4 dictionary items -for the host names to connect to. The names and services are, kafka, mysql, smtp and zookeeper +A data bag item named hosts in node[:mon_notification][:data_bag] is required for running. It simply has 4 dictionary items +for the host names and auth infomation to connect to the services: kafka, mysql, smtp and zookeeper Usage ----- diff --git a/metadata.rb b/metadata.rb index 2de31c0..9ef3072 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,5 +4,5 @@ maintainer_email 'hpcs-mon@hp.com' license 'All rights reserved' description 'Installs/Configures mon_notification' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.1.14' +version '0.1.15' depends 'python' diff --git a/templates/default/notification.yaml.erb b/templates/default/notification.yaml.erb index d569150..4751b82 100644 --- a/templates/default/notification.yaml.erb +++ b/templates/default/notification.yaml.erb @@ -1,22 +1,22 @@ kafka: - url: <%= @hosts['kafka'] %> + url: <%= @hosts['kafka']['url'] %> group: <%= node[:mon_notification][:group] %> - alarm_topic: alarm-state-transitions - notification_topic: alarm-notifications + alarm_topic: <%= @hosts['kafka']['alarm_topic'] %> + notification_topic: <%= @hosts['kafka']['notification_topic'] %> mysql: - host: <%= @hosts['mysql'] %> - user: notification - passwd: password - db: mon + host: <%= @hosts['mysql']['url'] %> + user: <%= @hosts['mysql']['user'] %> + passwd: <%= @hosts['mysql']['password'] %> + db: <%= @hosts['mysql']['database'] %> email: - server: <%= @hosts['smtp'] %> + server: <%= @hosts['smtp']['url'] %> port: 25 - user: - password: - timeout: 60 - from_addr: hpcs.mon@hp.com + user: <%= @hosts['smtp']['user'] %> + password: <%= @hosts['smtp']['password'] %> + timeout: <%= @hosts['smtp']['timeout'] %> + from_addr: <%= @hosts['smtp']['from_addr'] %> processors: alarm: @@ -32,7 +32,7 @@ queues: sent_notifications_size: 50 # limiting this size reduces potential # of re-sent notifications after a failure zookeeper: - url: <%= @hosts['zookeeper'] %> + url: <%= @hosts['zookeeper']['url'] %> max_offset_lag: 600 # In seconds, undefined for none logging: # Used in logging.dictConfig