]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/prometheus/templates/default/cloudwatch.yml.erb
Merge remote-tracking branch 'github/pull/710'
[chef.git] / cookbooks / prometheus / templates / default / cloudwatch.yml.erb
index cc801c22827dc62add77e2315032db860976de6d..bab5559b121f3a0477e82900bb3d005b024ccc4b 100644 (file)
@@ -7,18 +7,23 @@ discovery:
         - eu-west-1
         - eu-west-2
       roles:
-        - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role"
-      period: 300
-      length: 300
+        - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
+      period: 86400
+      length: 86400
       metrics:
         - name: BucketSizeBytes
           statistics: [Average]
-          period: 86400
-          length: 86400
         - name: NumberOfObjects
           statistics: [Average]
-          period: 86400
-          length: 86400
+    - type: AWS/S3
+      regions:
+        - eu-west-1
+        - eu-west-2
+      roles:
+        - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
+      period: 300
+      length: 300
+      metrics:
         - name: AllRequests
           statistics: [Sum]
         - name: GetRequests
@@ -58,18 +63,23 @@ discovery:
         - eu-central-1
         - us-west-2
       roles:
-        - roleArn: "arn:aws:iam::630658470130:role/osm-cloudwatch-export-role"
-      period: 300
-      length: 300
+        - roleArn: "arn:aws:iam::630658470130:role/osm-cloudwatch-export-role" # osm-planet (pds)
+      period: 86400
+      length: 86400
       metrics:
         - name: BucketSizeBytes
           statistics: [Average]
-          period: 86400
-          length: 86400
         - name: NumberOfObjects
           statistics: [Average]
-          period: 86400
-          length: 86400
+    - type: AWS/S3
+      regions:
+        - eu-central-1
+        - us-west-2
+      roles:
+        - roleArn: "arn:aws:iam::630658470130:role/osm-cloudwatch-export-role" # osm-planet (pds)
+      period: 300
+      length: 300
+      metrics:
         - name: AllRequests
           statistics: [Sum]
         - name: GetRequests
@@ -108,18 +118,22 @@ discovery:
       regions:
         - eu-north-1
       roles:
-        - roleArn: "arn:aws:iam::674083635870:role/osm-cloudwatch-export-role"
-      period: 300
-      length: 300
+        - roleArn: "arn:aws:iam::674083635870:role/osm-cloudwatch-export-role" # osm-backup
+      period: 86400
+      length: 86400
       metrics:
         - name: BucketSizeBytes
           statistics: [Average]
-          period: 86400
-          length: 86400
         - name: NumberOfObjects
           statistics: [Average]
-          period: 86400
-          length: 86400
+    - type: AWS/S3
+      regions:
+        - eu-north-1
+      roles:
+        - roleArn: "arn:aws:iam::674083635870:role/osm-cloudwatch-export-role" # osm-backup
+      period: 300
+      length: 300
+      metrics:
         - name: AllRequests
           statistics: [Sum]
         - name: GetRequests
@@ -154,3 +168,147 @@ discovery:
           statistics: [Maximum]
         - name: OperationsFailedReplication
           statistics: [Sum]
+    - type: AWS/EC2
+      regions:
+        - us-east-2
+      roles:
+        - roleArn: "arn:aws:iam::683740446523:role/osm-cloudwatch-export-role" # osm-render
+      period: 300
+      length: 300
+      metrics:
+        - name: CPUUtilization
+          statistics: [Average]
+        - name: DiskReadOps
+          statistics: [Sum]
+        - name: DiskWriteOps
+          statistics: [Sum]
+        - name: DiskReadBytes
+          statistics: [Sum]
+        - name: DiskWriteBytes
+          statistics: [Sum]
+        - name: NetworkIn
+          statistics: [Sum]
+        - name: NetworkOut
+          statistics: [Sum]
+        - name: NetworkPacketsIn
+          statistics: [Sum]
+        - name: NetworkPacketsOut
+          statistics: [Sum]
+    - type: AWS/Billing
+      regions:
+        - us-east-1
+      roles:
+        - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
+        - roleArn: "arn:aws:iam::674083635870:role/osm-cloudwatch-export-role" # osm-backup
+        - roleArn: "arn:aws:iam::683740446523:role/osm-cloudwatch-export-role" # osm-render
+        # Note osm-planet is billed direct to AWS Open Data Program
+      period: 21600
+      length: 21600
+      metrics:
+        - name: EstimatedCharges
+          statistics: [Sum]
+static:
+  - namespace: AWS/S3
+    name: gps-images-replication
+    regions:
+      - eu-north-1
+    roles:
+      - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
+    dimensions:
+      - name: RuleId
+        value: full-bucket-replication
+      - name: SourceBucket
+        value: openstreetmap-gps-images
+      - name: DestinationBucket
+        value: openstreetmap-gps-images-replicate
+    metrics:
+      - name: ReplicationLatency
+        statistics: [Maximum]
+        period: 300
+        length: 300
+      - name: BytesPendingReplication
+        statistics: [Maximum]
+        period: 300
+        length: 300
+      - name: OperationsPendingReplication
+        statistics: [Maximum]
+        period: 300
+        length: 300
+  - namespace: AWS/S3
+    name: gps-traces-replication
+    regions:
+      - eu-north-1
+    roles:
+      - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
+    dimensions:
+      - name: RuleId
+        value: full-bucket-replication
+      - name: SourceBucket
+        value: openstreetmap-gps-traces
+      - name: DestinationBucket
+        value: openstreetmap-gps-traces-replicate
+    metrics:
+      - name: ReplicationLatency
+        statistics: [Maximum]
+        period: 300
+        length: 300
+      - name: BytesPendingReplication
+        statistics: [Maximum]
+        period: 300
+        length: 300
+      - name: OperationsPendingReplication
+        statistics: [Maximum]
+        period: 300
+        length: 300
+  - namespace: AWS/S3
+    name: user-avatars-replication
+    regions:
+      - eu-north-1
+    roles:
+      - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
+    dimensions:
+      - name: RuleId
+        value: full-bucket-replication
+      - name: SourceBucket
+        value: openstreetmap-user-avatars
+      - name: DestinationBucket
+        value: openstreetmap-user-avatars-replicate
+    metrics:
+      - name: ReplicationLatency
+        statistics: [Maximum]
+        period: 300
+        length: 300
+      - name: BytesPendingReplication
+        statistics: [Maximum]
+        period: 300
+        length: 300
+      - name: OperationsPendingReplication
+        statistics: [Maximum]
+        period: 300
+        length: 300
+  - namespace: AWS/S3
+    name: aws-cloudtrail-replication
+    regions:
+      - eu-north-1
+    roles:
+      - roleArn: "arn:aws:iam::173189593406:role/osm-cloudwatch-export-role" # osm-main
+    dimensions:
+      - name: RuleId
+        value: full-bucket-replication
+      - name: SourceBucket
+        value: openstreetmap-aws-cloudtrail
+      - name: DestinationBucket
+        value: openstreetmap-aws-cloudtrail-replicate
+    metrics:
+      - name: ReplicationLatency
+        statistics: [Maximum]
+        period: 300
+        length: 300
+      - name: BytesPendingReplication
+        statistics: [Maximum]
+        period: 300
+        length: 300
+      - name: OperationsPendingReplication
+        statistics: [Maximum]
+        period: 300
+        length: 300