fix influxdb log file cannot be collected by logrotate

The logfile for influxdb is influxd.log, not influxdb.log
Correct the name in controller.yaml, so that logrotate could get
the log correctly.
Also, influxdb process uses error re-direction to append the error
message to influxd.log, so "copytruncate" need be added in logrotate
setting, so that log could be continue logged after logrotate
execution.

Closes-Bug: 1833167

Change-Id: I1ef484e3052355e5edc0cd0f7c629c7944daf014
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
This commit is contained in:
Shuicheng Lin 2019-06-24 12:54:56 +08:00
parent 7370282e64
commit f1071baa2a
2 changed files with 2 additions and 1 deletions

View File

@ -73,7 +73,7 @@ platform::influxdb::params::batch_timeout: '2s'
platform::influxdb::params::read_buffer: 0
# influxdb log ratation file
platform::influxdb::logrotate::params::log_file_name: '/var/log/influxdb/influxdb.log'
platform::influxdb::logrotate::params::log_file_name: '/var/log/influxdb/influxd.log'
platform::influxdb::logrotate::params::log_file_size: '20M'
platform::influxdb::logrotate::params::log_file_rotate: 10

View File

@ -5,6 +5,7 @@
start 1
missingok
compress
copytruncate
sharedscripts
nodateext
postrotate