Skip to content

Commit

Permalink
📝 Ajout fichier d'exemple police de rétention
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannig committed Nov 20, 2021
1 parent 3c49cdd commit 169862d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions chapitre-17/retention-policy.influx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ALTER RETENTION POLICY autogen ON prometheus DURATION 1d SHARD DURATION 1h

CREATE RETENTION POLICY "1m" ON prometheus DURATION 15d REPLICATION 1
CREATE CONTINUOUS QUERY "1m" ON prometheus BEGIN SELECT max(value), mean(value), min(value), sum(value) INTO prometheus."1m".:MEASUREMENT FROM prometheus../.*/ GROUP BY time(1m), * END

CREATE RETENTION POLICY "5m" ON prometheus DURATION 63d REPLICATION 1
CREATE CONTINUOUS QUERY "5m" ON prometheus BEGIN SELECT max(value), mean(value), min(value), sum(value) INTO prometheus."5m".:MEASUREMENT FROM prometheus../.*/ GROUP BY time(5m), * END

CREATE RETENTION POLICY "1h" ON prometheus DURATION 455d REPLICATION 1
CREATE CONTINUOUS QUERY "1h" ON prometheus BEGIN SELECT max(value), mean(value), min(value), sum(value) INTO prometheus."1h".:MEASUREMENT FROM prometheus../.*/ GROUP BY time(1h), * END

0 comments on commit 169862d

Please sign in to comment.