Update notification conf file for periodic notifications

This will default to the current (60 second) notifications,
but can be overridden with additional settings.  This is
necessary to install the latest monasca-notification with
changes for heat autoscaling.

Change-Id: I0b403fcc32f905f0404aeddf4264cd5db732b1f3
This commit is contained in:
Brad Klein 2016-07-13 13:45:52 -06:00
parent 02d817c04c
commit 1c53d1f872
2 changed files with 35 additions and 13 deletions

View File

@ -19,6 +19,14 @@
# [*pagerduty_url*]
# url of pager duty if used as a notification method
#
# [*periodic_kafka_topics*]
# list of periodic notification kafka topics, defaults
# to '60: 60-seconds-notifications'
#
# [*periodic_zookeeper_paths*]
# list of periodic notification zookeeper paths, defaults
# to '60: /notification/60_seconds'
#
# [*python_dep_ensure*]
# flag for whether or not to ensure/update python dependencies
#
@ -44,19 +52,21 @@
# list of zookeeper servers and ports
#
class monasca::notification(
$notification_user = 'monasca-notification',
$from_email_address = '',
$install_python_deps = true,
$kafka_brokers = 'localhost:9092',
$pagerduty_url = 'https://events.pagerduty.com/generic/2010-04-15/create_event.json',
$python_dep_ensure = 'present',
$smtp_password = '',
$smtp_port = 25,
$smtp_server = 'localhost',
$smtp_user = '',
$virtual_env = '/var/www/monasca-notification',
$webhook_url = '',
$zookeeper_servers = 'localhost:2181',
$notification_user = 'monasca-notification',
$from_email_address = '',
$install_python_deps = true,
$kafka_brokers = 'localhost:9092',
$pagerduty_url = 'https://events.pagerduty.com/generic/2010-04-15/create_event.json',
$periodic_kafka_topics = ['60: 60-seconds-notifications'],
$periodic_zookeeper_paths = ['60: /notification/60_seconds'],
$python_dep_ensure = 'present',
$smtp_password = '',
$smtp_port = 25,
$smtp_server = 'localhost',
$smtp_user = '',
$virtual_env = '/var/www/monasca-notification',
$webhook_url = '',
$zookeeper_servers = 'localhost:2181',
)
{
include ::monasca::params

View File

@ -5,6 +5,12 @@ kafka:
notification_topic: alarm-notifications
notification_retry_topic: retry-notifications
max_offset_lag: 600
<% if @periodic_kafka_topics and not @periodic_kafka_topics.empty? -%>
periodic:
<% @periodic_kafka_topics.each do |periodic_kafka_topic| -%>
<%= periodic_kafka_topic %>
<%- end -%>
<% end -%>
mysql:
host: <%= @sql_host %>
@ -51,6 +57,12 @@ zookeeper:
url: <%= @zookeeper_servers %>
notification_path: /notification/alarms
notification_retry_path: /notification/retry
<% if @periodic_zookeeper_paths and not @periodic_zookeeper_paths.empty? -%>
periodic_path:
<% @periodic_zookeeper_paths.each do |periodic_zookeeper_path| -%>
<%= periodic_zookeeper_path %>
<%- end -%>
<% end -%>
logging:
version: 1