11. Inducing a regular time series
from an irregular one
query: select count(customer_id) from events
where time > now() - 1h
group by time(1m), customer_id
16. Example from DevOps
• 2,000 servers, VMs, containers, or sensor units
• 200 measurements per server/unit
• every 10 seconds
• = 3,456,000,000 distinct points per day
34. Create a retention policy
CREATE RETENTION POLICY <rp-name> ON <db-name>
DURATION <duration> REPLICATION <n> [DEFAULT]
35. Create a retention policy
CREATE RETENTION POLICY <rp-name> ON <db-name>
DURATION <duration> REPLICATION <n> [DEFAULT]
CREATE RETENTION POLICY high_precision ON mydb
DURATION 7d REPLICATION 3 DEFAULT
36. Create a retention policy
CREATE RETENTION POLICY <rp-name> ON <db-name>
DURATION <duration> REPLICATION <n> [DEFAULT]
CREATE RETENTION POLICY high_precision ON mydb
DURATION 7d REPLICATION 3 DEFAULT
Writes will go into this RP unless
otherwise specified
45. Discovery
SHOW MEASUREMENTs
SHOW MEASUREMENTS where host = 'serverA'
SHOW TAG KEYS
SHOW TAG KEYS from CPU
SHOW TAG VALUES from CPU WITH KEY = 'region'
SHOW SERIES
SHOW SERIES where service = 'redis'
53. Continuous queries
CREATE CONTINUOUS QUERY "10m_event_count"
ON mydb
BEGIN
SELECT count(value)
INTO "6_months".events
FROM events
GROUP BY time(10m)
END;