113
112
#. Relogin to let the group change take effect.
114
113
#. Create `/etc/swift/log-processor.conf`::
117
swift_account = <your-stats-account-hash>
118
user = <your-user-name>
120
[log-processor-access]
121
swift_account = <your-stats-account-hash>
122
container_name = log_data
123
log_dir = /var/log/swift/hourly/
124
source_filename_format = %Y%m%d%H
125
class_path = swift.stats.access_processor.AccessLogProcessor
126
user = <your-user-name>
128
[log-processor-stats]
129
swift_account = <your-stats-account-hash>
130
container_name = account_stats
131
log_dir = /var/log/swift/stats/
132
source_filename_format = %Y%m%d%H_*
133
class_path = swift.stats.stats_processor.StatsLogProcessor
134
account_server_conf = /etc/swift/account-server/1.conf
135
user = <your-user-name>
116
swift_account = <your-stats-account-hash>
117
user = <your-user-name>
119
[log-processor-access]
120
swift_account = <your-stats-account-hash>
121
container_name = log_data
122
log_dir = /var/log/swift/hourly/
123
source_filename_pattern = ^
125
(?P<month>[0-1][0-9])
129
class_path = swift.stats.access_processor.AccessLogProcessor
130
user = <your-user-name>
132
[log-processor-stats]
133
swift_account = <your-stats-account-hash>
134
container_name = account_stats
135
log_dir = /var/log/swift/stats/
136
class_path = swift.stats.stats_processor.StatsLogProcessor
137
devices = /srv/1/node
139
user = <your-user-name>
141
[log-processor-container-stats]
142
swift_account = <your-stats-account-hash>
143
container_name = container_stats
144
log_dir = /var/log/swift/stats/
145
class_path = swift.stats.stats_processor.StatsLogProcessor
147
devices = /srv/1/node
149
user = <your-user-name>
137
151
#. Add the following under [app:proxy-server] in `/etc/swift/proxy-server.conf`::
139
log_facility = LOG_LOCAL1
153
log_facility = LOG_LOCAL1
141
155
#. Create a `cron` job to run once per hour to create the stats logs. In
142
156
`/etc/cron.d/swift-stats-log-creator`::
144
0 * * * * <your-user-name> swift-account-stats-logger /etc/swift/log-processor.conf
146
#. Create a `cron` job to run once per hour to upload the stats logs. In
147
`/etc/cron.d/swift-stats-log-uploader`::
149
10 * * * * <your-user-name> swift-log-uploader /etc/swift/log-processor.conf stats
158
0 * * * * <your-user-name> /usr/local/bin/swift-account-stats-logger /etc/swift/log-processor.conf
160
#. Create a `cron` job to run once per hour to create the container stats logs. In
161
`/etc/cron.d/swift-container-stats-log-creator`::
163
5 * * * * <your-user-name> /usr/local/bin/swift-container-stats-logger /etc/swift/log-processor.conf
165
#. Create a `cron` job to run once per hour to upload the stats logs. In
166
`/etc/cron.d/swift-stats-log-uploader`::
168
10 * * * * <your-user-name> /usr/local/bin/swift-log-uploader /etc/swift/log-processor.conf stats
170
#. Create a `cron` job to run once per hour to upload the stats logs. In
171
`/etc/cron.d/swift-stats-log-uploader`::
173
15 * * * * <your-user-name> /usr/local/bin/swift-log-uploader /etc/swift/log-processor.conf container-stats
151
175
#. Create a `cron` job to run once per hour to upload the access logs. In
152
176
`/etc/cron.d/swift-access-log-uploader`::
154
5 * * * * <your-user-name> swift-log-uploader /etc/swift/log-processor.conf access
178
5 * * * * <your-user-name> /usr/local/bin/swift-log-uploader /etc/swift/log-processor.conf access
156
180
#. Create a `cron` job to run once per hour to process the logs. In
157
181
`/etc/cron.d/swift-stats-processor`::
159
30 * * * * <your-user-name> swift-log-stats-collector /etc/swift/log-processor.conf
183
30 * * * * <your-user-name> /usr/local/bin/swift-log-stats-collector /etc/swift/log-processor.conf
161
185
After running for a few hours, you should start to see .csv files in the
162
186
log_processing_data container in the swift stats account that was created