]> git.openstreetmap.org Git - chef.git/blob - cookbooks/prometheus/templates/default/cloudwatch.yml.erb
Statically configure backup replication metrics
[chef.git] / cookbooks / prometheus / templates / default / cloudwatch.yml.erb
1 apiVersion: v1alpha1
2 sts-region: eu-west-1
3 discovery:
4   jobs:
5     - type: AWS/S3
6       regions:
7         - eu-west-1
8         - eu-west-2
9       roles:
10         - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
11       roundingPeriod: 86400
12       period: 86400
13       length: 86400
14       metrics:
15         - name: BucketSizeBytes
16           statistics: [Average]
17         - name: NumberOfObjects
18           statistics: [Average]
19     - type: AWS/S3
20       regions:
21         - eu-west-1
22         - eu-west-2
23       roles:
24         - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
25       roundingPeriod: 300
26       period: 300
27       length: 300
28       metrics:
29         - name: AllRequests
30           statistics: [Sum]
31         - name: GetRequests
32           statistics: [Sum]
33         - name: PutRequests
34           statistics: [Sum]
35         - name: DeleteRequests
36           statistics: [Sum]
37         - name: HeadRequests
38           statistics: [Sum]
39         - name: PostRequests
40           statistics: [Sum]
41         - name: ListRequests
42           statistics: [Sum]
43         - name: BytesDownloaded
44           statistics: [Sum]
45         - name: BytesUploaded
46           statistics: [Sum]
47         - name: 4xxErrors
48           statistics: [Sum]
49         - name: 5xxErrors
50           statistics: [Sum]
51         - name: FirstByteLatency
52           statistics: [Minimum, Maximum, Average]
53         - name: TotalRequestLatency
54           statistics: [Minimum, Maximum, Average]
55         - name: ReplicationLatency
56           statistics: [Maximum]
57         - name: BytesPendingReplication
58           statistics: [Maximum]
59         - name: OperationsPendingReplication
60           statistics: [Maximum]
61         - name: OperationsFailedReplication
62           statistics: [Sum]
63     - type: AWS/S3
64       regions:
65         - eu-central-1
66         - us-west-2
67       roles:
68         - roleArn: "arn:aws:iam::630658470130:role/osm-cloudwatch-export-role" # osm-planet (pds)
69       roundingPeriod: 86400
70       period: 86400
71       length: 86400
72       metrics:
73         - name: BucketSizeBytes
74           statistics: [Average]
75         - name: NumberOfObjects
76           statistics: [Average]
77     - type: AWS/S3
78       regions:
79         - eu-central-1
80         - us-west-2
81       roles:
82         - roleArn: "arn:aws:iam::630658470130:role/osm-cloudwatch-export-role" # osm-planet (pds)
83       roundingPeriod: 300
84       period: 300
85       length: 300
86       metrics:
87         - name: AllRequests
88           statistics: [Sum]
89         - name: GetRequests
90           statistics: [Sum]
91         - name: PutRequests
92           statistics: [Sum]
93         - name: DeleteRequests
94           statistics: [Sum]
95         - name: HeadRequests
96           statistics: [Sum]
97         - name: PostRequests
98           statistics: [Sum]
99         - name: ListRequests
100           statistics: [Sum]
101         - name: BytesDownloaded
102           statistics: [Sum]
103         - name: BytesUploaded
104           statistics: [Sum]
105         - name: 4xxErrors
106           statistics: [Sum]
107         - name: 5xxErrors
108           statistics: [Sum]
109         - name: FirstByteLatency
110           statistics: [Minimum, Maximum, Average]
111         - name: TotalRequestLatency
112           statistics: [Minimum, Maximum, Average]
113         - name: ReplicationLatency
114           statistics: [Maximum]
115         - name: BytesPendingReplication
116           statistics: [Maximum]
117         - name: OperationsPendingReplication
118           statistics: [Maximum]
119         - name: OperationsFailedReplication
120           statistics: [Sum]
121     - type: AWS/S3
122       regions:
123         - eu-north-1
124       roles:
125         - roleArn: "arn:aws:iam::674083635870:role/osm-cloudwatch-export-role" # osm-backup
126       roundingPeriod: 86400
127       period: 86400
128       length: 86400
129       metrics:
130         - name: BucketSizeBytes
131           statistics: [Average]
132         - name: NumberOfObjects
133           statistics: [Average]
134     - type: AWS/S3
135       regions:
136         - eu-north-1
137       roles:
138         - roleArn: "arn:aws:iam::674083635870:role/osm-cloudwatch-export-role" # osm-backup
139       roundingPeriod: 300
140       period: 300
141       length: 300
142       metrics:
143         - name: AllRequests
144           statistics: [Sum]
145         - name: GetRequests
146           statistics: [Sum]
147         - name: PutRequests
148           statistics: [Sum]
149         - name: DeleteRequests
150           statistics: [Sum]
151         - name: HeadRequests
152           statistics: [Sum]
153         - name: PostRequests
154           statistics: [Sum]
155         - name: ListRequests
156           statistics: [Sum]
157         - name: BytesDownloaded
158           statistics: [Sum]
159         - name: BytesUploaded
160           statistics: [Sum]
161         - name: 4xxErrors
162           statistics: [Sum]
163         - name: 5xxErrors
164           statistics: [Sum]
165         - name: FirstByteLatency
166           statistics: [Minimum, Maximum, Average]
167         - name: TotalRequestLatency
168           statistics: [Minimum, Maximum, Average]
169         - name: ReplicationLatency
170           statistics: [Maximum]
171         - name: BytesPendingReplication
172           statistics: [Maximum]
173         - name: OperationsPendingReplication
174           statistics: [Maximum]
175         - name: OperationsFailedReplication
176           statistics: [Sum]
177     - type: AWS/EC2
178       regions:
179         - us-east-2
180       roles:
181         - roleArn: "arn:aws:iam::683740446523:role/osm-cloudwatch-export-role" # osm-render
182       roundingPeriod: 300
183       period: 300
184       length: 300
185       metrics:
186         - name: CPUUtilization
187           statistics: [Average]
188         - name: DiskReadOps
189           statistics: [Sum]
190         - name: DiskWriteOps
191           statistics: [Sum]
192         - name: DiskReadBytes
193           statistics: [Sum]
194         - name: DiskWriteBytes
195           statistics: [Sum]
196         - name: NetworkIn
197           statistics: [Sum]
198         - name: NetworkOut
199           statistics: [Sum]
200         - name: NetworkPacketsIn
201           statistics: [Sum]
202         - name: NetworkPacketsOut
203           statistics: [Sum]
204     - type: AWS/Billing
205       regions:
206         - us-east-1
207       roles:
208         - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
209         - roleArn: "arn:aws:iam::674083635870:role/osm-cloudwatch-export-role" # osm-backup
210         - roleArn: "arn:aws:iam::683740446523:role/osm-cloudwatch-export-role" # osm-render
211         # Note osm-planet is billed direct to AWS Open Data Program
212       roundingPeriod: 21600
213       period: 21600
214       length: 21600
215       metrics:
216         - name: EstimatedCharges
217           statistics: [Sum]
218 static:
219   - namespace: AWS/S3
220     name: gps-images-replication
221     regions:
222       - eu-north-1
223     roles:
224       - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
225     dimensions:
226       - name: RuleId
227         value: full-bucket-replication
228       - name: SourceBucket
229         value: openstreetmap-gps-images
230       - name: DestinationBucket
231         value: openstreetmap-gps-images-replicate
232     metrics:
233       - name: ReplicationLatency
234         statistics: [Maximum]
235         period: 300
236         length: 300
237       - name: BytesPendingReplication
238         statistics: [Maximum]
239         period: 300
240         length: 300
241       - name: OperationsPendingReplication
242         statistics: [Maximum]
243         period: 300
244         length: 300
245   - namespace: AWS/S3
246     name: gps-traces-replication
247     regions:
248       - eu-north-1
249     roles:
250       - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
251     dimensions:
252       - name: RuleId
253         value: full-bucket-replication
254       - name: SourceBucket
255         value: openstreetmap-gps-traces
256       - name: DestinationBucket
257         value: openstreetmap-gps-traces-replicate
258     metrics:
259       - name: ReplicationLatency
260         statistics: [Maximum]
261         period: 300
262         length: 300
263       - name: BytesPendingReplication
264         statistics: [Maximum]
265         period: 300
266         length: 300
267       - name: OperationsPendingReplication
268         statistics: [Maximum]
269         period: 300
270         length: 300
271   - namespace: AWS/S3
272     name: user-avatars-replication
273     regions:
274       - eu-north-1
275     roles:
276       - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
277     dimensions:
278       - name: RuleId
279         value: full-bucket-replication
280       - name: SourceBucket
281         value: openstreetmap-user-avatars
282       - name: DestinationBucket
283         value: openstreetmap-user-avatars-replicate
284     metrics:
285       - name: ReplicationLatency
286         statistics: [Maximum]
287         period: 300
288         length: 300
289       - name: BytesPendingReplication
290         statistics: [Maximum]
291         period: 300
292         length: 300
293       - name: OperationsPendingReplication
294         statistics: [Maximum]
295         period: 300
296         length: 300
297   - namespace: AWS/S3
298     name: aws-cloudtrail-replication
299     regions:
300       - eu-north-1
301     roles:
302       - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
303     dimensions:
304       - name: RuleId
305         value: full-bucket-replication
306       - name: SourceBucket
307         value: openstreetmap-aws-cloudtrail
308       - name: DestinationBucket
309         value: openstreetmap-aws-cloudtrail-replicate
310     metrics:
311       - name: ReplicationLatency
312         statistics: [Maximum]
313         period: 300
314         length: 300
315       - name: BytesPendingReplication
316         statistics: [Maximum]
317         period: 300
318         length: 300
319       - name: OperationsPendingReplication
320         statistics: [Maximum]
321         period: 300
322         length: 300