blob: 3a56addb4b448303f1e5478a12ee9e77a4924a8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
#!/bin/bash
RSYNC_FLAGS='-az --no-motd'
function syncHttpLogs {
# in case we missed a run or two.. try to catch up the last 3 days.
for d in 1 2 3
do
HOST=$1
# some machines store stuff in old format. some new.
if [ "$2" = "old" ]; then
YESTERDAY=$(/bin/date -d "-$d days" +%Y-%m-%d)
else
YESTERDAY=$(/bin/date -d "-$d days" +%Y%m%d)
fi
YEAR=$(/bin/date -d "-$d days" +%Y)
MONTH=$(/bin/date -d "-$d days" +%m)
DAY=$(/bin/date -d "-$d days" +%d)
/bin/mkdir -p /var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/http
cd /var/log/hosts/$HOST/$YEAR/$MONTH/$DAY/http/
for f in $(/usr/bin/rsync $RSYNC_FLAGS --list-only $HOST::log/httpd/*$YESTERDAY* | awk '{ print $5 }')
do
DEST=$(echo $f | /bin/sed s/-$YESTERDAY//)
/usr/bin/rsync $RSYNC_FLAGS $HOST::log/httpd/$f ./$DEST
done
done
}
## Sync up all proxies
{% for host in groups['proxies'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up all staging proxies
{% for host in groups['proxies-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up all fas servers
{% for host in groups['fas'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['fas-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up all fedocal hosts
{% for host in groups['fedocal'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['fedocal-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up all data grepper hosts
{% for host in groups['datagrepper'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['datagrepper-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up all ipsilon hosts
{% for host in groups['ipsilon'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['ipsilon-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up all ask hosts
{% for host in groups['ask'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['ask-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up all badges hosts
{% for host in groups['badges-web'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['badges-web-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up all elections hosts
{% for host in groups['elections'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['elections-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up all tagger hosts
{% for host in groups['tagger'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['tagger-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up all bodhi hosts
{% for host in groups['bodhi2'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['bodhi2-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up packages hosts
{% for host in groups['packages'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['packages-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up blockerbugs
{% for host in groups['blockerbugs'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['blockerbugs-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up value
{% for host in groups['value'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['value-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up secondary
{% for host in groups['secondary'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up hosted
{% for host in groups['hosted'] %}
syncHttpLogs {{host}} old
{% endfor %}
## sync up people
{% for host in groups['people'] %}
syncHttpLogs {{host}} old
{% endfor %}
## sync up nagios
{% for host in groups['nagios'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['nagios-new'] %}
syncHttpLogs {{host}}
{% endfor %}
## sync up download
{% for host in groups['download-phx2'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['download-ibiblio'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['download-rdu2'] %}
syncHttpLogs {{host}}
{% endfor %}
## sync up sundries
{% for host in groups['sundries'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['sundries-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## sync up statscache
{% for host in groups['statscache-web'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['statscache-web-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## sync up autocloud
{% for host in groups['autocloud-web'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['autocloud-web-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## sync up koschei
{% for host in groups['koschei-web'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['koschei-web-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## sync up notifs
{% for host in groups['notifs-web'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['notifs-web-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
## Sync up pdc
{% for host in groups['pdc-web'] %}
syncHttpLogs {{host}}
{% endfor %}
{% for host in groups['pdc-web-stg'] %}
syncHttpLogs {{host}}
{% endfor %}
|