Browse code

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

Mehdi Abaakouk authored on 2013/10/23 16:26:25
Showing 1 changed files
... ...
@@ -82,6 +82,10 @@ function configure_ceilometer() {
82 82
     cp $CEILOMETER_DIR/etc/ceilometer/pipeline.yaml $CEILOMETER_CONF_DIR
83 83
     iniset $CEILOMETER_CONF DEFAULT policy_file $CEILOMETER_CONF_DIR/policy.json
84 84
 
85
+    if [ "$CEILOMETER_PIPELINE_INTERVAL" ]; then
86
+        sed -i "s/interval:.*/interval: ${CEILOMETER_PIPELINE_INTERVAL}/" $CEILOMETER_CONF_DIR/pipeline.yaml
87
+    fi
88
+
85 89
     # the compute and central agents need these credentials in order to
86 90
     # call out to the public nova and glance APIs
87 91
     iniset $CEILOMETER_CONF DEFAULT os_username ceilometer