Change hostname in collectd.conf
- Add code to match collectd hostname to the system's hostname. - Add reno for this bug fix. Change-Id: I4e4138addc979436de04200ffdedc5f440351116 Closes-Bug: #1680013
This commit is contained in:
parent
c85245b6f2
commit
b0e2772f0a
@ -120,6 +120,10 @@ function adapt_collectd_conf {
|
||||
sudo -E mkdir -p "$COLLECTD_CONF_DIR"
|
||||
fi
|
||||
|
||||
# Configure collectd hostname
|
||||
CONF_FILE=$(sudo find /etc -name "collectd.conf")
|
||||
sudo sed -E -i 's|(^\|^#)Hostname.*$|Hostname "'$(hostname)'"|g' $CONF_FILE
|
||||
|
||||
# Configure collectd-ceilometer-plugin
|
||||
if [[ "$COLLECTD_CEILOMETER_ENABLED" == "True" ]]; then
|
||||
sudo cp $COLLECTD_CEILOMETER_DIR/etc/collectd.conf.d/collectd-ceilometer-plugin.conf $COLLECTD_CONF_DIR/
|
||||
|
4
releasenotes/notes/bug-1680013-3bba4f2f08f361a3.yaml
Normal file
4
releasenotes/notes/bug-1680013-3bba4f2f08f361a3.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
fixes:
|
||||
- Fixes 'bug 1680013 https://bugs.launchpad.net/collectd-ceilometer-plugin/+bug/1680013'
|
||||
Hostname in collectd is now set to match the system hostname.
|
Loading…
x
Reference in New Issue
Block a user