Added logging for stats processing
This commit is contained in:
doc/source
@ -191,6 +191,10 @@ Optional: Setting up rsyslog for individual logging
|
||||
# Uncomment the following to have a log containing all logs together
|
||||
#local1,local2,local3,local4,local5.* /var/log/swift/all.log
|
||||
|
||||
# Uncomment the following to have hourly proxy logs for stats processing
|
||||
#$template HourlyProxyLog,"/var/log/swift/hourly/%$YEAR%%$MONTH%%$DAY%%$HOUR%"
|
||||
#local1.*;local1.!notice ?HourlyProxyLog
|
||||
|
||||
local1.*;local1.!notice /var/log/swift/proxy.log
|
||||
local1.notice /var/log/swift/proxy.error
|
||||
local1.* ~
|
||||
@ -211,7 +215,12 @@ Optional: Setting up rsyslog for individual logging
|
||||
local5.notice /var/log/swift/storage4.error
|
||||
local5.* ~
|
||||
|
||||
#. `mkdir /var/log/swift`
|
||||
#. Edit /var/log/rsyslog.conf and make the following change::
|
||||
|
||||
$PrivDropToGroup adm
|
||||
|
||||
#. `mkdir -p /var/log/swift/hourly`
|
||||
#. `chown -R syslog.adm /var/log/swift`
|
||||
#. `restart rsyslog`
|
||||
|
||||
------------------------------------------------
|
||||
|
@ -89,45 +89,25 @@ Running the stats system on SAIO
|
||||
#. Create a swift account to use for storing stats information, and note the
|
||||
account hash. The hash will be used in config files.
|
||||
|
||||
#. Install syslog-ng::
|
||||
#. Edit /etc/rsyslog.d/10-swift.conf::
|
||||
|
||||
sudo apt-get install syslog-ng
|
||||
# Uncomment the following to have a log containing all logs together
|
||||
#local1,local2,local3,local4,local5.* /var/log/swift/all.log
|
||||
|
||||
#. Add the following to the end of `/etc/syslog-ng/syslog-ng.conf`::
|
||||
$template HourlyProxyLog,"/var/log/swift/hourly/%$YEAR%%$MONTH%%$DAY%%$HOUR%"
|
||||
local1.*;local1.!notice ?HourlyProxyLog
|
||||
|
||||
# Added for swift logging
|
||||
destination df_local1 { file("/var/log/swift/proxy.log" owner(<username>) group(<groupname>)); };
|
||||
destination df_local1_err { file("/var/log/swift/proxy.error" owner(<username>) group(<groupname>)); };
|
||||
destination df_local1_hourly { file("/var/log/swift/hourly/$YEAR$MONTH$DAY$HOUR" owner(<username>) group(<groupname>)); };
|
||||
filter f_local1 { facility(local1) and level(info); };
|
||||
local1.*;local1.!notice /var/log/swift/proxy.log
|
||||
local1.notice /var/log/swift/proxy.error
|
||||
local1.* ~
|
||||
|
||||
filter f_local1_err { facility(local1) and not level(info); };
|
||||
|
||||
# local1.info -/var/log/swift/proxy.log
|
||||
# write to local file and to remove log server
|
||||
log {
|
||||
source(s_all);
|
||||
filter(f_local1);
|
||||
destination(df_local1);
|
||||
destination(df_local1_hourly);
|
||||
};
|
||||
|
||||
# local1.error -/var/log/swift/proxy.error
|
||||
# write to local file and to remove log server
|
||||
log {
|
||||
source(s_all);
|
||||
filter(f_local1_err);
|
||||
destination(df_local1_err);
|
||||
};
|
||||
|
||||
#. Restart syslog-ng
|
||||
|
||||
#. Create the log directories::
|
||||
|
||||
mkdir /var/log/swift/hourly
|
||||
mkdir /var/log/swift/stats
|
||||
chown -R <username>:<groupname> /var/log/swift
|
||||
#. Edit /var/log/rsyslog.conf and make the following change::
|
||||
|
||||
$PrivDropToGroup adm
|
||||
|
||||
#. `mkdir -p /var/log/swift/hourly`
|
||||
#. `chown -R syslog.adm /var/log/swift`
|
||||
#. `restart rsyslog`
|
||||
#. Create `/etc/swift/log-processor.conf`::
|
||||
|
||||
[log-processor]
|
||||
@ -181,4 +161,4 @@ earlier. This file will have one entry per account per hour for each account
|
||||
with activity in that hour. One .csv file should be produced per hour. Note
|
||||
that the stats will be delayed by at least two hours by default. This can be
|
||||
changed with the new_log_cutoff variable in the config file. See
|
||||
`log-processing.conf-sample` for more details.
|
||||
`log-processing.conf-sample` for more details.
|
||||
|
Reference in New Issue
Block a user