Fix duplicit collectd logging

Decrease syslog verbosity when file logging is enabled.

Change-Id: If2c53556914cdc15e6442a264c44c7b9404838e8
Closes-Bug: #1644476
This commit is contained in:
Jaroslav Safka 2017-02-06 13:13:31 +00:00
parent 457fb7417e
commit 9b2bcf893e
2 changed files with 6 additions and 1 deletions

View File

@ -73,7 +73,7 @@ function adapt_collectd_conf {
sudo cp $COLLECTD_CEILOMETER_DIR/etc/collectd.conf.d/logfile.conf $COLLECTD_CONF_DIR/01-logfile.conf
sudo sed -i 's|LogLevel.*$|LogLevel "'$COLLECTD_LOG_LEVEL'"|g' $COLLECTD_CONF_DIR/01-logfile.conf
sudo sed -i '/<Plugin.*logfile/,/^<\/Plugin>/{s|LogLevel.*$|LogLevel "'$COLLECTD_LOG_LEVEL'"|}' $COLLECTD_CONF_DIR/01-logfile.conf
sudo sed -i 's|File.*$|File "'$COLLECTD_LOG_FILE'"|g' $COLLECTD_CONF_DIR/01-logfile.conf
}

View File

@ -4,3 +4,8 @@ LoadPlugin "logfile"
File "/opt/stack/screen/collectd.log"
Timestamp true
</Plugin>
# Decrease syslog verbosity, to avoid duplicate logging
<Plugin "syslog">
LogLevel "err"
</Plugin>