From 014fa900cd0ccd0184a55174f2e5d6067b491ff1 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 30 Dec 2015 14:34:44 +0100 Subject: [PATCH] devstack: add support for Gnocchi backend Change-Id: Ie5beee502ab07e4fca3353dae03c2f1f524a48c7 --- devstack/plugin.sh | 11 +++++++++++ devstack/settings | 3 +++ 2 files changed, 14 insertions(+) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index abcedff123..542ef58fed 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -245,6 +245,17 @@ function _ceilometer_configure_storage_backend { elif [ "$CEILOMETER_BACKEND" = 'mongodb' ] ; then iniset $CEILOMETER_CONF database event_connection mongodb://localhost:27017/ceilometer iniset $CEILOMETER_CONF database metering_connection mongodb://localhost:27017/ceilometer + elif [ "$CEILOMETER_BACKEND" = 'gnocchi' ] ; then + gnocchi_url=$(gnocchi_service_url) + iniset $CEILOMETER_CONF DEFAULT meter_dispatchers gnocchi + iniset $CEILOMETER_CONF dispatcher_gnocchi url $gnocchi_url + iniset $CEILOMETER_CONF dispatcher_gnocchi archive_policy ${GNOCCHI_ARCHIVE_POLICY} + if is_service_enabled swift && [[ "$GNOCCHI_STORAGE_BACKEND" = 'swift' ]] ; then + iniset $CEILOMETER_CONF dispatcher_gnocchi filter_service_activity "True" + iniset $CEILOMETER_CONF dispatcher_gnocchi filter_project "gnocchi_swift" + else + iniset $CEILOMETER_CONF dispatcher_gnocchi filter_service_activity "False" + fi else die $LINENO "Unable to configure unknown CEILOMETER_BACKEND $CEILOMETER_BACKEND" fi diff --git a/devstack/settings b/devstack/settings index db0ab8e230..c32f732c35 100644 --- a/devstack/settings +++ b/devstack/settings @@ -19,6 +19,9 @@ CEILOMETER_WSGI_DIR=${CEILOMETER_WSGI_DIR:-/var/www/ceilometer} # Set up database backend CEILOMETER_BACKEND=${CEILOMETER_BACKEND:-mysql} +# Gnocchi default archive_policy for Ceilometer +GNOCCHI_ARCHIVE_POLICY=${GNOCCHI_ARCHIVE_POLICY:-low} + # Ceilometer connection info. CEILOMETER_SERVICE_PROTOCOL=http CEILOMETER_SERVICE_HOST=$SERVICE_HOST