diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 0f56068311..2ffdeff260 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -37,6 +37,7 @@ # CEILOMETER_BACKEND: Database backend (e.g. 'mysql', 'mongodb', 'es') # CEILOMETER_COORDINATION_URL: URL for group membership service provided by tooz. # CEILOMETER_EVENTS: Set to True to enable event collection +# CEILOMETER_EVENT_ALARM: Set to True to enable publisher for event alarming # Save trace setting XTRACE=$(set +o | grep xtrace) @@ -259,6 +260,11 @@ function configure_ceilometer { if [ "$CEILOMETER_PIPELINE_INTERVAL" ]; then sed -i "s/interval:.*/interval: ${CEILOMETER_PIPELINE_INTERVAL}/" $CEILOMETER_CONF_DIR/pipeline.yaml fi + if [ "$CEILOMETER_EVENT_ALARM" == "True" ]; then + if ! grep -q '^ *- notifier://?topic=alarm.all$' $CEILOMETER_CONF_DIR/event_pipeline.yaml; then + sed -i '/^ *publishers:$/,+1s|^\( *\)-.*$|\1- notifier://?topic=alarm.all\n&|' $CEILOMETER_CONF_DIR/event_pipeline.yaml + fi + fi # The compute and central agents need these credentials in order to # call out to other services' public APIs. diff --git a/devstack/settings b/devstack/settings index 6b9a48a29d..cd7fafd598 100644 --- a/devstack/settings +++ b/devstack/settings @@ -34,6 +34,8 @@ CEILOMETER_EVENTS=${CEILOMETER_EVENTS:-True} CEILOMETER_COORDINATION_URL=${CEILOMETER_COORDINATION_URL:-} CEILOMETER_PIPELINE_INTERVAL=${CEILOMETER_PIPELINE_INTERVAL:-} +CEILOMETER_EVENT_ALARM=${CEILOMETER_EVENT_ALARM:-False} + # Tell Tempest this project is present TEMPEST_SERVICES+=,ceilometer