Merge "DevStack enablement of the collectd-ceilometer custom units feature"

This commit is contained in:
Jenkins 2017-01-11 10:35:22 +00:00 committed by Gerrit Code Review
commit 2e2cec7b26
6 changed files with 56 additions and 1 deletions

View File

@ -46,6 +46,17 @@ sudo sed -i 's|CEILOMETER_TIMEOUT.*$|CEILOMETER_TIMEOUT "'$CEILOMETER_TIMEOUT'"|
sudo sed -i 's|OS_PASSWORD.*$|OS_PASSWORD "'$SERVICE_PASSWORD'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
sudo sed -i 's|OS_TENANT_NAME.*$|OS_TENANT_NAME "'$SERVICE_TENANT_NAME'"|g' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
# Configure custom units
if [[ "$COLLECTD_CEILOMETER_UNITS" != none ]]; then
OIFS=$IFS
IFS=','
for UNIT in $COLLECTD_CEILOMETER_UNITS
do
sudo sed -i '/<UNITS>/a\ UNIT '"$UNIT"'' $COLLECTD_CONF_DIR/collectd-ceilometer-plugin.conf
done
IFS=$OIFS
fi
# Configure collectd logfile plugin
if [ -n $COLLECTD_LOG_FILE ]; then
touch $COLLECTD_LOG_FILE

View File

@ -26,3 +26,6 @@ if [ -z $COLLECTD_CONF_DIR ]; then
COLLECTD_CONF_DIR=/etc/collectd.d
fi
fi
#Custom units feature
COLLECTD_CEILOMETER_UNITS=${COLLECTD_CUSTOMIZE_UNITS:-none}

View File

@ -36,7 +36,10 @@ from the collectd-ceilometer-plugin repo into your devstack directory.
Edit the "HOST_IP" varible to appropriately match your environment.
Build your devstack environment.
If you wish to enable any extra features please follow the instructions in the
"Additional Features" section below before moving on to the next step.
Finally, build your devstack environment.
| ./stack.sh
@ -52,3 +55,22 @@ this meter are being sent to ceilometer, thus confirming that collectd is
working with ceilometer.
| ceilometer sample-list --meter cpu.cpu
Addtional Features
==================
Custom Units Feature
--------------------
This feature enables users to define new units for existing meter values.
To enable this feature execute the following instructions:
* To include your new units, add the following line with your chosen units to
your local.conf file.
| COLLECTD_CEILOMETER_UNITS="<meter> <unit>"
If you would like to add more than one new unit include them in the same line
and seperate each meter and its unit with a comma, as shown below.
| COLLECTD_CEILOMETER_UNITS="<meter> <unit>,<meter> <unit>"

View File

@ -60,6 +60,14 @@ COLLECTD_LOG_LEVEL
this are going to be filtered out from the log file.
Default: info
COLLECTD_CEILOMETER_UNITS
(meter=unit) a comma seperated list of pairs, defining meters and their units.
Allows existing units to be changed and new units to be set for new meters.
Example: COLLECTD_CEILOMETER_UNITS="<meter> <unit>,<meter> <unit>"
Authenticating using Identity Server API v3
===========================================

View File

@ -30,5 +30,7 @@
OS_PASSWORD "password"
OS_TENANT_NAME "service"
<UNITS>
</UNITS>
</Module>
</Plugin>

View File

@ -0,0 +1,9 @@
---
features:
- Enabled the pre-existing custom units feature for DevStack
deployment. You can now customize the units of existing meters
before DevStack is deployed. This can be done for multiple
units at a time.
other:
- Updated the devstackGSG.rst guide to provide instructions on
how to enable the custom units feature before DevStack is deployed.