Created
January 17, 2020 11:50
-
-
Save rlagmlah/d7774119d53e1d0ed0fd47ae3102a4e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alter retention policy "autogen" on "graphite" duration 24h shard duration 1h default | |
CREATE RETENTION POLICY "twoday" ON "graphite" DURATION 2d REPLICATION 1 | |
CREATE RETENTION POLICY "week" ON "graphite" DURATION 7d REPLICATION 1 | |
CREATE RETENTION POLICY "month" ON "graphite" DURATION 31d REPLICATION 1 | |
CREATE RETENTION POLICY "year" ON "graphite" DURATION 366d REPLICATION 1 | |
CREATE RETENTION POLICY "inf" ON "graphite" DURATION INF REPLICATION 1 | |
CREATE CONTINUOUS QUERY "cq_twoday" ON "graphite" BEGIN SELECT mean(value) as value INTO "graphite"."twoday".:MEASUREMENT FROM /.*/ GROUP BY time(60s),* END | |
CREATE CONTINUOUS QUERY "cq_week" ON "graphite" BEGIN SELECT mean(value) as value INTO "graphite"."week".:MEASUREMENT FROM /.*/ GROUP BY time(300s),* END | |
CREATE CONTINUOUS QUERY "cq_month" ON "graphite" BEGIN SELECT mean(value) as value INTO "graphite"."month".:MEASUREMENT FROM /.*/ GROUP BY time(1800s),* END | |
CREATE CONTINUOUS QUERY "cq_year" ON "graphite" BEGIN SELECT mean(value) as value INTO "graphite"."year".:MEASUREMENT FROM /.*/ GROUP BY time(21600s),* END | |
CREATE CONTINUOUS QUERY "cq_inf" ON "graphite" BEGIN SELECT mean(value) as value INTO "graphite"."inf".:MEASUREMENT FROM /.*/ GROUP BY time(43200s),* END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment