2. Agenda: New Practitioners Track
WORKSHOPAGENDA
8:00 AM – 9:00 AM Breakfast
9:00 AM – 10:00 AM Installing the TICK Stack and Your First Query Katy Farmer
10:00 AM – 10:50 AM Chronograf and Dashboarding Margo Schaedel
10:50 AM – 11:20 AM Break
11:20 AM – 12:10 PM Writing Queries (InfluxQL and TICK) Katy Farmer
12:10 PM – 1:10 PM Lunch
1:10 PM – 2:00 PM Architecting InfluxEnterprise for Success Ed Bernier
2:00 PM – 2:10 PM Break
2:10 PM – 3:10 PM Optimizing the TICK Stack Dave Patton
3:10 PM – 4:00 PM Downsampling Data Michael DeSa
4:00 PM Pizza and Beer
3. Michael DeSa
Software Engineer
@mjdesa
Downsampling Data
Michael DeSa is a Software Engineer at InfluxData who focuses
on increasing the performance capabilities of InfluxDB. He has
led the InfluxDB training course across the US, providing
students with an in depth understanding of how InfluxDB works
as well as sharing best practices. He has a degree in Math, with
a focus on Abstract Algebra, from the University of California, at
Berkeley and was an Instructor of the Web Development
Immersive series at General Assembly in San Francisco.
12. Smart
Downsampling
• Data relevance decreases with age
– new data - high resolution
– old data - low resolution
• As new data becomes old, decrease the
resolution
16. CQ Syntax
CREATE CONTINUOUS QUERY <cq_name>
ON <database_name>
BEGIN
SELECT <function>(<stuff>)
INTO <destination_measurement>
FROM <source_measurement>
GROUP BY time(<interval>), [tags]
END
17. CQ Example
CREATE CONTINUOUS QUERY mycq
ON telegraf
BEGIN
SELECT mean(usage_user)
INTO telegraf.rollup_5m.cpu
FROM telegraf.autogen.cpu
GROUP BY time(5m), *
END
18. CQ Example
CREATE CONTINUOUS QUERY mycq
ON telegraf
BEGIN
SELECT mean(usage_user) AS usage_user
INTO telegraf.rollup_5m.cpu
FROM telegraf.autogen.cpu
GROUP BY time(5m), *
END
19. CQ Example
CREATE CONTINUOUS QUERY mycq
ON telegraf
BEGIN
SELECT mean(*)
INTO telegraf.rollup_5m.:MEASUREMENT:
FROM telegraf.autogen./.*/
GROUP BY time(5m), *
END
20. Issues with the
General CQ
CREATE CONTINUOUS QUERY mycq
ON telegraf
BEGIN
SELECT mean(*)
INTO telegraf.rollup_5m.:MEASUREMENT:
FROM telegraf.autogen./.*/
GROUP BY time(5m), *
END
21. Issues with CQs
• Places Extra Load on your InfluxDB instance
• Limited to things expressible in InfluxQL
– No rolling windows
– No cross measurement joins
• All CQ processing and execution runs on a
single node in the cluster
• Can’t have consistent field names without
having many CQs
– field_a -> mean_field_a
28. Issues with
Kapacitor
• Stream tasks currently aren’t feasible in high
throughput InfluxDB instances
– All write load gets mirrored onto a single
Kapacitor instance
• TICKscript doesn’t have support for
wildcard operations
– Only way to downsample all data is to have
(#measurement x #fields) tasks