From 41be9d9a1342c7848e7a17fb8e6682aad16ee333 Mon Sep 17 00:00:00 2001 From: Phil Neal Date: Tue, 12 Aug 2014 13:59:20 -0600 Subject: [PATCH] Add elements for Ceilometer alarm services Adds Ceilometer alarm-evaluator and alarm-notifier services: * element for alarm-evaluator * element for alarm-notifier * configuration options for alarm services Change-Id: I223d24256dcd4e9515149bdbdb9d021b0ef4d00e --- elements/ceilometer-alarm-evaluator/README.md | 1 + elements/ceilometer-alarm-evaluator/element-deps | 3 +++ .../69-ceilometer-alarm-evaluator | 4 ++++ .../post-configure.d/69-ceilometer-alarm-evaluator | 6 ++++++ elements/ceilometer-alarm-notifier/README.md | 1 + elements/ceilometer-alarm-notifier/element-deps | 4 ++++ .../69-ceilometer-alarm-notifier | 4 ++++ .../post-configure.d/69-ceilometer-alarm-notifier | 6 ++++++ .../os-apply-config/etc/ceilometer/ceilometer.conf | 9 +++++++++ 9 files changed, 38 insertions(+) create mode 100644 elements/ceilometer-alarm-evaluator/README.md create mode 100644 elements/ceilometer-alarm-evaluator/element-deps create mode 100755 elements/ceilometer-alarm-evaluator/install.d/ceilometer-source-install/69-ceilometer-alarm-evaluator create mode 100755 elements/ceilometer-alarm-evaluator/os-refresh-config/post-configure.d/69-ceilometer-alarm-evaluator create mode 100644 elements/ceilometer-alarm-notifier/README.md create mode 100644 elements/ceilometer-alarm-notifier/element-deps create mode 100755 elements/ceilometer-alarm-notifier/install.d/ceilometer-source-install/69-ceilometer-alarm-notifier create mode 100755 elements/ceilometer-alarm-notifier/os-refresh-config/post-configure.d/69-ceilometer-alarm-notifier diff --git a/elements/ceilometer-alarm-evaluator/README.md b/elements/ceilometer-alarm-evaluator/README.md new file mode 100644 index 000000000..7a92f44e2 --- /dev/null +++ b/elements/ceilometer-alarm-evaluator/README.md @@ -0,0 +1 @@ +Enable the Ceilometer Alarm Evaluator service diff --git a/elements/ceilometer-alarm-evaluator/element-deps b/elements/ceilometer-alarm-evaluator/element-deps new file mode 100644 index 000000000..381bdfbc9 --- /dev/null +++ b/elements/ceilometer-alarm-evaluator/element-deps @@ -0,0 +1,3 @@ +ceilometer +os-refresh-config +os-svc-install diff --git a/elements/ceilometer-alarm-evaluator/install.d/ceilometer-source-install/69-ceilometer-alarm-evaluator b/elements/ceilometer-alarm-evaluator/install.d/ceilometer-source-install/69-ceilometer-alarm-evaluator new file mode 100755 index 000000000..38449c547 --- /dev/null +++ b/elements/ceilometer-alarm-evaluator/install.d/ceilometer-source-install/69-ceilometer-alarm-evaluator @@ -0,0 +1,4 @@ +#!/bin/bash +set -eux + +os-svc-daemon -i "$CEILOMETER_VENV_DIR" ceilometer-alarm-evaluator ceilometer ceilometer-alarm-evaluator --config-dir /etc/ceilometer diff --git a/elements/ceilometer-alarm-evaluator/os-refresh-config/post-configure.d/69-ceilometer-alarm-evaluator b/elements/ceilometer-alarm-evaluator/os-refresh-config/post-configure.d/69-ceilometer-alarm-evaluator new file mode 100755 index 000000000..9095f744f --- /dev/null +++ b/elements/ceilometer-alarm-evaluator/os-refresh-config/post-configure.d/69-ceilometer-alarm-evaluator @@ -0,0 +1,6 @@ +#!/bin/bash +set -eux + +os-svc-enable -n ceilometer-alarm-evaluator + +os-svc-restart -n ceilometer-alarm-evaluator diff --git a/elements/ceilometer-alarm-notifier/README.md b/elements/ceilometer-alarm-notifier/README.md new file mode 100644 index 000000000..0c458001e --- /dev/null +++ b/elements/ceilometer-alarm-notifier/README.md @@ -0,0 +1 @@ +Enable the Ceilometer Alarm Notification service diff --git a/elements/ceilometer-alarm-notifier/element-deps b/elements/ceilometer-alarm-notifier/element-deps new file mode 100644 index 000000000..bd0d2beae --- /dev/null +++ b/elements/ceilometer-alarm-notifier/element-deps @@ -0,0 +1,4 @@ +ceilometer +ceilometer-alarm-evaluator +os-refresh-config +os-svc-install diff --git a/elements/ceilometer-alarm-notifier/install.d/ceilometer-source-install/69-ceilometer-alarm-notifier b/elements/ceilometer-alarm-notifier/install.d/ceilometer-source-install/69-ceilometer-alarm-notifier new file mode 100755 index 000000000..bf27f91af --- /dev/null +++ b/elements/ceilometer-alarm-notifier/install.d/ceilometer-source-install/69-ceilometer-alarm-notifier @@ -0,0 +1,4 @@ +#!/bin/bash +set -eux + +os-svc-daemon -i "$CEILOMETER_VENV_DIR" ceilometer-alarm-notifier ceilometer ceilometer-alarm-notifier --config-dir /etc/ceilometer diff --git a/elements/ceilometer-alarm-notifier/os-refresh-config/post-configure.d/69-ceilometer-alarm-notifier b/elements/ceilometer-alarm-notifier/os-refresh-config/post-configure.d/69-ceilometer-alarm-notifier new file mode 100755 index 000000000..1b7389080 --- /dev/null +++ b/elements/ceilometer-alarm-notifier/os-refresh-config/post-configure.d/69-ceilometer-alarm-notifier @@ -0,0 +1,6 @@ +#!/bin/bash +set -eux + +os-svc-enable -n ceilometer-alarm-notifier + +os-svc-restart -n ceilometer-alarm-evaluator diff --git a/elements/ceilometer/os-apply-config/etc/ceilometer/ceilometer.conf b/elements/ceilometer/os-apply-config/etc/ceilometer/ceilometer.conf index 56dfb33c2..7f03d54db 100644 --- a/elements/ceilometer/os-apply-config/etc/ceilometer/ceilometer.conf +++ b/elements/ceilometer/os-apply-config/etc/ceilometer/ceilometer.conf @@ -33,6 +33,15 @@ readonly_user_password={{ceilometer.snmpd_readonly_user_password}} {{/ceilometer.snmpd_readonly_user_name}} +[alarm] +evaluation_service=ceilometer.alarm.service.SingletonAlarmService +rest_notifier_ssl_verify=false +notifier_rpc_topic=alarm_notifier +partition_rpc_topic=alarm_partition_coordination +evaluation_interval=60 +record_history=true + + [api] {{#haproxy}} {{#stunnel.connect_ip}}