Fix duplicit collectd logging
Decrease syslog verbosity when file logging is enabled. Change-Id: If2c53556914cdc15e6442a264c44c7b9404838e8 Closes-Bug: #1644476
This commit is contained in:
parent
457fb7417e
commit
9b2bcf893e
@ -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 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
|
sudo sed -i 's|File.*$|File "'$COLLECTD_LOG_FILE'"|g' $COLLECTD_CONF_DIR/01-logfile.conf
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,3 +4,8 @@ LoadPlugin "logfile"
|
|||||||
File "/opt/stack/screen/collectd.log"
|
File "/opt/stack/screen/collectd.log"
|
||||||
Timestamp true
|
Timestamp true
|
||||||
</Plugin>
|
</Plugin>
|
||||||
|
|
||||||
|
# Decrease syslog verbosity, to avoid duplicate logging
|
||||||
|
<Plugin "syslog">
|
||||||
|
LogLevel "err"
|
||||||
|
</Plugin>
|
||||||
|
Loading…
Reference in New Issue
Block a user