Allow users to configure the CM pipeline interval
The patch allows users to configure the ceilometer pipeline interval.
In localrc, we can add CEILOMETER_PIPELINE_INTERVAL=10 to handle the
pipeline each 10 seconds instead of the default 10 minutes.
Change-Id: Ic5216adbdfd70ade38912871ac6df3be732bf780
diff --git a/lib/ceilometer b/lib/ceilometer
index dcadb07..e626427 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -82,6 +82,10 @@
cp $CEILOMETER_DIR/etc/ceilometer/pipeline.yaml $CEILOMETER_CONF_DIR
iniset $CEILOMETER_CONF DEFAULT policy_file $CEILOMETER_CONF_DIR/policy.json
+ if [ "$CEILOMETER_PIPELINE_INTERVAL" ]; then
+ sed -i "s/interval:.*/interval: ${CEILOMETER_PIPELINE_INTERVAL}/" $CEILOMETER_CONF_DIR/pipeline.yaml
+ fi
+
# the compute and central agents need these credentials in order to
# call out to the public nova and glance APIs
iniset $CEILOMETER_CONF DEFAULT os_username ceilometer