Move collectd logs to platformdata and rotate it

This commit is contained in:
Girish Ramakrishnan
2020-02-18 20:34:13 -08:00
parent 15cc1f92e3
commit 037440034b
4 changed files with 6 additions and 3 deletions
+1
View File
@@ -1785,4 +1785,5 @@
* Display timestamps in browser timezone in the UI
* Mail eventlog
* Add permission where a user can just invite other users
* Setup logrotate configs for collectd since upstream does not set it up
+3 -2
View File
@@ -47,7 +47,8 @@ mkdir -p "${PLATFORM_DATA_DIR}/backup"
mkdir -p "${PLATFORM_DATA_DIR}/logs/backup" \
"${PLATFORM_DATA_DIR}/logs/updater" \
"${PLATFORM_DATA_DIR}/logs/tasks" \
"${PLATFORM_DATA_DIR}/logs/crash"
"${PLATFORM_DATA_DIR}/logs/crash" \
"${PLATFORM_DATA_DIR}/logs/collectd"
mkdir -p "${PLATFORM_DATA_DIR}/update"
mkdir -p "${BOX_DATA_DIR}/appicons"
@@ -114,7 +115,7 @@ rm -f /etc/sudoers.d/${USER}
cp "${script_dir}/start/sudoers" /etc/sudoers.d/${USER}
echo "==> Configuring collectd"
rm -rf /etc/collectd
rm -rf /etc/collectd /var/log/collectd.log
ln -sfF "${PLATFORM_DATA_DIR}/collectd" /etc/collectd
cp "${script_dir}/start/collectd/collectd.conf" "${PLATFORM_DATA_DIR}/collectd/collectd.conf"
systemctl restart collectd
+1 -1
View File
@@ -57,7 +57,7 @@ LoadPlugin logfile
<Plugin logfile>
LogLevel "info"
File "/var/log/collectd.log"
File "/home/yellowtent/platformdata/logs/collectd/collectd.log"
Timestamp true
PrintSeverity false
</Plugin>
+1
View File
@@ -9,6 +9,7 @@
/home/yellowtent/platformdata/logs/sftp/*.log
/home/yellowtent/platformdata/logs/redis-*/*.log
/home/yellowtent/platformdata/logs/crash/*.log
/home/yellowtent/platformdata/logs/collectd/*.log
/home/yellowtent/platformdata/logs/updater/*.log {
# only keep one rotated file, we currently do not send that over the api
rotate 1