Add COLLECTD_CONF_DIR config option
Add COLLECTD_CONF_DIR config option so that a non-default config dir can be specified for collectd. Closes-Bug #1583282 Change-Id: Ic697b9e35f6d3b063e53dca2cb44fa24f8be3598
This commit is contained in:
parent
19fb15f51a
commit
3a4a108756
@ -3,13 +3,6 @@
|
||||
# common functions for collectd ceilometer plugin
|
||||
# -----------------------------------------------
|
||||
|
||||
if is_ubuntu; then
|
||||
COLLECTD_CONF_DIR=/etc/collectd/collectd.conf.d
|
||||
elif is_fedora; then
|
||||
COLLECTD_CONF_DIR=/etc/collectd.d
|
||||
fi
|
||||
|
||||
|
||||
# start/stop service
|
||||
#
|
||||
function start_collectd {
|
||||
|
@ -2,6 +2,7 @@
|
||||
COLLECTD_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )
|
||||
COLLECTD_BATCH_SIZE=${COLLECTD_BATCH_SIZE:-3}
|
||||
COLLECTD_INSTALL=${COLLECTD_INSTALL:-True}
|
||||
COLLECTD_CONF_DIR=${COLLECTD_CONF_DIR:-''}
|
||||
|
||||
# Ceilometer connection info.
|
||||
CEILOMETER_URL_TYPE=${CEILOMETER_URL_TYPE:-internalURL}
|
||||
@ -12,5 +13,12 @@ OS_AUTH_URL="$KEYSTONE_AUTH_URI/v$IDENTITY_API_VERSION"
|
||||
OS_USERNAME="ceilometer"
|
||||
OS_PASSWORD=${SERVICE_PASSWORD}
|
||||
|
||||
|
||||
# Fall back to default conf dir if option is unset
|
||||
if [ -z $COLLECTD_CONF_DIR ]; then
|
||||
if is_ubuntu; then
|
||||
COLLECTD_CONF_DIR=/etc/collectd/collectd.conf.d
|
||||
elif is_fedora; then
|
||||
COLLECTD_CONF_DIR=/etc/collectd.d
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -12,6 +12,13 @@ To use collectd-ceilometer-plugin in collectd::
|
||||
local.conf settings
|
||||
-------------------
|
||||
|
||||
COLLECTD_CONF_DIR
|
||||
(directory) Specify a directory where collectd conf files reside.
|
||||
This is required if you use a distro other than Ubuntu or Fedora, or if
|
||||
the config file is in a non default location.
|
||||
Default: /etc/collectd/collectd.conf.d (Ubuntu) /etc/collect.d (Fedora)
|
||||
|
||||
|
||||
COLLECTD_INSTALL
|
||||
(True|False) Indicates whether to install collectd from package manager.
|
||||
Set this to False if you are running a custom collectd build or do not
|
||||
|
Loading…
x
Reference in New Issue
Block a user