Skip to content

Commit

Permalink
Make prometheus backup service fail on error
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Oct 21, 2023
1 parent 91fb247 commit ee9c089
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cookbooks/prometheus/templates/default/backup-data.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# DO NOT EDIT - This file is being maintained by Chef

set -e

SNAPSHOT=$(curl -s -XPOST http://localhost:9090/prometheus/api/v1/admin/tsdb/snapshot | jq -r .data.name)

/opt/awscli/v2/current/bin/aws --profile osm-prometheus-data-upload s3 sync --storage-class=INTELLIGENT_TIERING --no-progress /var/lib/prometheus/metrics2/snapshots/${SNAPSHOT} s3://openstreetmap-prometheus-data
Expand Down

0 comments on commit ee9c089

Please sign in to comment.