SlideShare a Scribd company logo
1 of 59
Scott Anderson
Senior Technical Writer & Technical Lead of
the Docs team @ InfluxData
InfluxDB Tasks
Beyond Downsampling
© 2020 InfluxData. All rights reserved. 2
What is an InfluxDB task?
A scheduled Flux script
© 2020 InfluxData. All rights reserved. 3
Why tasks?
● Automate repeated operations
● A replacement for Continuous Queries
(CQs) in InfluxDB Cloud and InfluxDB
2.0
© 2020 InfluxData. All rights reserved. 4
Downsampling cascade
© 2020 InfluxData. All rights reserved. 5
CREATE CONTINUOUS QUERY "downsample-daily" ON "my-db"
BEGIN
SELECT mean("example-field")
INTO "average-example-measurement"
FROM "example-measurement"
GROUP BY time(1h)
END
© 2020 InfluxData. All rights reserved. 6
from(bucket: "my-bucket")
|> range(start: tasks.lastSuccess(orTime: -task.every)
|> filter(fn: (r) =>
r._measurement == "example-m" and
r._field == "value"
)
|> aggregateWindow(every: 1h, fn: mean())
|> to(bucket: "downsampled-daily", org: "my-org")
© 2020 InfluxData. All rights reserved. 7
Downsampling InfluxDB Template
github.com/influxdata/community-templates
© 2020 InfluxData. All rights reserved. 8
© 2020 InfluxData. All rights reserved. 9
and the potential of Flux
BEYOND Downsampling
Monitoring & Alerting
© 2020 InfluxData. All rights reserved. 12
© 2020 InfluxData. All rights reserved. 13
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/tasks"
import "influxdata/influxdb/v1"
check = {_check_id: "00000000deadbeef", _check_name: "Average memory monitor", _type: "threshold", tags: {}}
task_data = from(bucket: "my-bucket")
|> range(start: tasks.lastSuccess(orTime: -task.every), stop: now())
|> filter(fn: (r) => r._measurement == "telegraf" and r._field == "mem")
|> mean()
ok = (r) => r._value <= 60.0
crit = (r) => r._value > 95.0
warn = (r) => r._value > 80.0 and r._value <= 95.0
info = (r) => r._value > 60.0 and r._value <= 80.0
messageFn = (r) => ("Average mem check: ${r.host}'s average memory usage is ${r._value}%.")
task_data
|> v1.fieldsAsCols()
|> monitor.check(data: check, messageFn: messageFn, ok: ok, crit: crit, warn: warn, info: info)
System-generated check task
© 2020 InfluxData. All rights reserved. 14
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/tasks"
import "influxdata/influxdb/v1"
check = {_check_id: "00000000deadbeef", _check_name: "Average memory monitor", _type: "threshold", tags: {}}
task_data = from(bucket: "my-bucket")
|> range(start: tasks.lastSuccess(orTime: -task.every), stop: now())
|> filter(fn: (r) => r._measurement == "telegraf" and r._field == "mem")
|> mean()
ok = (r) => r._value <= 60.0
crit = (r) => r._value > 95.0
warn = (r) => r._value > 80.0 and r._value <= 95.0
info = (r) => r._value > 60.0 and r._value <= 80.0
messageFn = (r) => ("Average mem check: ${r.host}'s average memory usage is ${r._value}%.")
task_data
|> v1.fieldsAsCols()
|> monitor.check(data: check, messageFn: messageFn, ok: ok, crit: crit, warn: warn, info: info)
System-generated check task
© 2020 InfluxData. All rights reserved. 15
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/tasks"
import "influxdata/influxdb/v1"
check = {_check_id: "00000000deadbeef", _check_name: "Average memory monitor", _type: "threshold", tags: {}}
task_data = from(bucket: "my-bucket")
|> range(start: tasks.lastSuccess(orTime: -task.every), stop: now())
|> filter(fn: (r) => r._measurement == "telegraf" and r._field == "mem")
|> mean()
ok = (r) => r._value <= 60.0
crit = (r) => r._value > 95.0
warn = (r) => r._value > 80.0 and r._value <= 95.0
info = (r) => r._value > 60.0 and r._value <= 80.0
messageFn = (r) => ("Average mem check: ${r.host}'s average memory usage is ${r._value}%.")
task_data
|> v1.fieldsAsCols()
|> monitor.check(data: check, messageFn: messageFn, ok: ok, crit: crit, warn: warn, info: info)
System-generated check task
© 2020 InfluxData. All rights reserved. 16
© 2020 InfluxData. All rights reserved. 17
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/tasks"
import "influxdata/influxdb/v1"
check = {_check_id: "00000000deadbeef", _check_name: "Average memory monitor", _type: "threshold", tags: {}}
task_data = from(bucket: "my-bucket")
|> range(start: tasks.lastSuccess(orTime: -task.every), stop: now())
|> filter(fn: (r) => r._measurement == "telegraf" and r._field == "mem")
|> mean()
ok = (r) => r._value <= 60.0
crit = (r) => r._value > 95.0
warn = (r) => r._value > 80.0 and r._value <= 95.0
info = (r) => r._value > 60.0 and r._value <= 80.0
messageFn = (r) => ("Average mem check: ${r.host}'s average memory usage is ${r._value}%.")
task_data
|> v1.fieldsAsCols()
|> monitor.check(data: check, messageFn: messageFn, ok: ok, crit: crit, warn: warn, info: info)
System-generated check task
© 2020 InfluxData. All rights reserved. 18
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/tasks"
import "influxdata/influxdb/v1"
check = {_check_id: "00000000deadbeef", _check_name: "Average memory monitor", _type: "threshold", tags: {}}
task_data = from(bucket: "my-bucket")
|> range(start: tasks.lastSuccess(orTime: -task.every), stop: now())
|> filter(fn: (r) => r._measurement == "telegraf" and r._field == "mem")
|> mean()
ok = (r) => r._value <= 60.0
crit = (r) => r._value > 95.0
warn = (r) => r._value > 80.0 and r._value <= 95.0
info = (r) => r._value > 60.0 and r._value <= 80.0
messageFn = (r) => ("Average mem check: ${r.host}'s average memory usage is ${r._value}%.")
task_data
|> v1.fieldsAsCols()
|> monitor.check(data: check, messageFn: messageFn, ok: ok, crit: crit, warn: warn, info: info)
System-generated check task
© 2020 InfluxData. All rights reserved. 19
© 2020 InfluxData. All rights reserved. 20
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/slack"
endpoint = slack.endpoint(
url: "https://slack.com/api/chat.postMessage",
token: "SLACK_TOKEN")
)
monitor.from(
start: -task.every,
fn: (r) => r._level == "crit"
)
|> endpoint(mapFn: (r) => ({ r with channel: "alerts", text: r.message, color: "danger"}))()
System-generated notification task
© 2020 InfluxData. All rights reserved. 21
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/slack"
endpoint = slack.endpoint(
url: "https://slack.com/api/chat.postMessage",
token: "SLACK_TOKEN")
)
monitor.from(
start: -task.every,
fn: (r) => r._level == "crit"
)
|> endpoint(mapFn: (r) => ({ r with channel: "alerts", text: r.message, color: "danger"}))()
System-generated notification task
© 2020 InfluxData. All rights reserved. 22
import "influxdata/influxdb/monitor"
import "influxdata/influxdb/slack"
endpoint = slack.endpoint(
url: "https://slack.com/api/chat.postMessage",
token: "SLACK_TOKEN")
)
monitor.from(
start: -task.every,
fn: (r) => r._level == "crit"
)
|> endpoint(mapFn: (r) => ({ r with channel: "alerts", text: r.message, color: "danger"}))()
System-generated notification task
© 2020 InfluxData. All rights reserved. 23
*
Simple Custom Alerts
Send alerts without using InfluxDB
checks & notifications
© 2020 InfluxData. All rights reserved. 25
import "influxata/influxdb/tasks"
import "influxata/influxdb/slack"
import anomaly "contrib/anaisdg/anomalydetection"
toSlack = slack.endpoint(
url: "https://slack.com/api/chat.postMessage",
token: secrets.get(key: "SLACK_TOKEN")
)
from(bucket: "example")
|> range(start: tasks.lastSuccess(orTime: -task.every))
|> filter(fn: (r) => r._measurement == "m")
|> anomaly.mad()
|> filter(fn: (r) => r.level == "anomaly")
|> toSlack(
mapFn: (r) => { r with
channel: "anomalies",
text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}",
color: "danger"
}
)()
Custom anomaly detection alert
© 2020 InfluxData. All rights reserved. 26
import "influxata/influxdb/tasks"
import "influxata/influxdb/slack"
import anomaly "contrib/anaisdg/anomalydetection"
toSlack = slack.endpoint(
url: "https://slack.com/api/chat.postMessage",
token: secrets.get(key: "SLACK_TOKEN")
)
from(bucket: "example")
|> range(start: tasks.lastSuccess(orTime: -task.every))
|> filter(fn: (r) => r._measurement == "m")
|> anomaly.mad()
|> filter(fn: (r) => r.level == "anomaly")
|> toSlack(
mapFn: (r) => { r with
channel: "anomalies",
text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}",
color: "danger"
}
)()
Custom anomaly detection alert
© 2020 InfluxData. All rights reserved. 27
import "influxata/influxdb/tasks"
import "influxata/influxdb/slack"
import anomaly "contrib/anaisdg/anomalydetection"
toSlack = slack.endpoint(
url: "https://slack.com/api/chat.postMessage",
token: secrets.get(key: "SLACK_TOKEN")
)
from(bucket: "example")
|> range(start: tasks.lastSuccess(orTime: -task.every))
|> filter(fn: (r) => r._measurement == "m")
|> anomaly.mad()
|> filter(fn: (r) => r.level == "anomaly")
|> toSlack(
mapFn: (r) => { r with
channel: "anomalies",
text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}",
color: "danger"
}
)()
Custom anomaly detection alert
© 2020 InfluxData. All rights reserved. 28
import "influxata/influxdb/tasks"
import "influxata/influxdb/slack"
import anomaly "contrib/anaisdg/anomalydetection"
toSlack = slack.endpoint(
url: "https://slack.com/api/chat.postMessage",
token: secrets.get(key: "SLACK_TOKEN")
)
from(bucket: "example")
|> range(start: tasks.lastSuccess(orTime: -task.every))
|> filter(fn: (r) => r._measurement == "m")
|> anomaly.mad()
|> filter(fn: (r) => r.level == "anomaly")
|> toSlack(
mapFn: (r) => { r with
channel: "anomalies",
text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}",
color: "danger"
}
)()
Custom anomaly detection alert
© 2020 InfluxData. All rights reserved. 29
import "influxata/influxdb/tasks"
import "influxata/influxdb/slack"
import anomaly "contrib/anaisdg/anomalydetection"
toSlack = slack.endpoint(
url: "https://slack.com/api/chat.postMessage",
token: secrets.get(key: "SLACK_TOKEN")
)
from(bucket: "example")
|> range(start: tasks.lastSuccess(orTime: -task.every))
|> filter(fn: (r) => r._measurement == "m")
|> anomaly.mad()
|> filter(fn: (r) => r.level == "anomaly")
|> toSlack(
mapFn: (r) => { r with
channel: "anomalies",
text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}",
color: "danger"
}
)()
Custom anomaly detection alert
© 2020 InfluxData. All rights reserved. 30
import "influxata/influxdb/tasks"
import "influxata/influxdb/slack"
import anomaly "contrib/anaisdg/anomalydetection"
toSlack = slack.endpoint(
url: "https://slack.com/api/chat.postMessage",
token: secrets.get(key: "SLACK_TOKEN")
)
from(bucket: "example")
|> range(start: tasks.lastSuccess(orTime: -task.every))
|> filter(fn: (r) => r._measurement == "m")
|> anomaly.mad()
|> filter(fn: (r) => r.level == "anomaly")
|> toSlack(
mapFn: (r) => { r with
channel: "anomalies",
text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}",
color: "danger"
}
)()
Custom anomaly detection alert
© 2020 InfluxData. All rights reserved. 31
import "influxata/influxdb/tasks"
import "influxata/influxdb/slack"
import anomaly "contrib/anaisdg/anomalydetection"
toSlack = slack.endpoint(
url: "https://slack.com/api/chat.postMessage",
token: secrets.get(key: "SLACK_TOKEN")
)
from(bucket: "example")
|> range(start: tasks.lastSuccess(orTime: -task.every))
|> filter(fn: (r) => r._measurement == "m")
|> anomaly.mad()
|> filter(fn: (r) => r.level == "anomaly")
|> toSlack(
mapFn: (r) => { r with
channel: "anomalies",
text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}",
color: "danger"
}
)()
Custom anomaly detection alert
Execute generated function
Data Ingest
© 2020 InfluxData. All rights reserved. 33
import "csv"
csvData = "#datatype,string,long,dateTime:RFC3339,string,double
#group,false,false,false,true,false
#default,,,,,
,result,table,_time,region,_value
,,0,2018-05-08T20:50:00Z,east,15.43
,,0,2018-05-08T20:50:20Z,east,59.25
,,1,2018-05-08T20:50:00Z,west,62.73
"
csv.from(csv:csvData)
|> to(org: "my-org", bucket: "my-bucket")
Write data using annotated CSV
© 2020 InfluxData. All rights reserved. 34
import "experimental/csv"
csv.from(url: "https://influx-testdata.s3.amazonaws.com/noaa.csv")
|> to(org: "my-org", bucket: "noaa")
Write data using remote annotated CSV
© 2020 InfluxData. All rights reserved. 35
import "experimental/array"
data = [
{_time: 2018-05-08T20:50:00Z, region: "east", _value: 15.43},
{_time: 2018-05-08T20:50:20Z, region: "east", _value: 59.25},
{_time: 2018-05-08T20:50:00Z, region: "west", _value: 62.73}
]
array.from(rows: data)
|> to(org: "my-org", bucket: "my-bucket")
Write data with using an array of records
© 2020 InfluxData. All rights reserved. 36
// ...
response = http.get(
url: "http://localhost:8086/health",
headers: {Authorization: "Token mYsuP3rS3cRe7T0kEn"}
)
responseBody = response.body
seedRow = [{_time: now()}]
array.from(rows: seedRow)
|> map(fn: (r) => {
body = json.parse(data: responseBody)
return { r with
_measurement: "monitoring",
_field: "influxdb_status",
_value: body.message,
name: body.name
}
})
|> to(org: "my-org", bucket: "my-bucket")
Write data with using an HTTP response
© 2020 InfluxData. All rights reserved. 37
// ...
response = http.get(
url: "http://localhost:8086/health",
headers: {Authorization: "Token mYsuP3rS3cRe7T0kEn"}
)
responseBody = response.body
seedRow = [{_time: now()}]
array.from(rows: seedRow)
|> map(fn: (r) => {
body = json.parse(data: responseBody)
return { r with
_measurement: "monitoring",
_field: "influxdb_status",
_value: body.message,
name: body.name
}
})
|> to(org: "my-org", bucket: "my-bucket")
Write data with using an HTTP response
© 2020 InfluxData. All rights reserved. 38
// ...
response = http.get(
url: "http://localhost:8086/health",
headers: {Authorization: "Token mYsuP3rS3cRe7T0kEn"}
)
responseBody = response.body
seedRow = [{_time: now()}]
array.from(rows: seedRow)
|> map(fn: (r) => {
body = json.parse(data: responseBody)
return { r with
_measurement: "monitoring",
_field: "influxdb_status",
_value: body.message,
name: body.name
}
})
|> to(org: "my-org", bucket: "my-bucket")
Write data with using an HTTP response
© 2020 InfluxData. All rights reserved. 39
© 2020 InfluxData. All rights reserved. 40
import "experimental/prometheus"
prometheus.scrape(url: "http://localhost:8086/metrics")
|> to(
org: "my-org",
bucket: "my-bucket"
)
Scrape data from a Prometheus endpoint
© 2020 InfluxData. All rights reserved. 41
import "influxdata/influxdb/secrets"
import "sql"
username = secrets.get(key: "POSTGRES_USER")
password = secrets.get(key: "POSTGRES_PASS")
sql.from(
driverName: "postgres",
dataSourceName: "postgresql://${username}:${password}@localhost",
query:"SELECT * FROM example_table"
)
Query a SQL datasource
Data Enrichment
© 2020 InfluxData. All rights reserved. 43
join()
© 2020 InfluxData. All rights reserved. 44
_time sensorID _field _value
2020-06-01T00:12:00Z TM02001 temp 70.32
2020-06-01T00:12:01Z TM02002 temp 70.45
2020-06-01T00:12:02Z TM02003 temp 98.41
sensorID location status
TM02001 SF1.RM406 OK
TM02002 SF1.RM412 OK
TM02003 SF2.RM290 Requires service
© 2020 InfluxData. All rights reserved. 45
import "sql"
import "influxdata/influxdb/secrets"
username = secrets.get(key: "POSTGRES_USER")
password = secrets.get(key: "POSTGRES_PASS")
telemetry = from(bucket: "sensor-data")
|> range(start: -task.every)
|> filter(fn: (r) => r._measurement == "sensor-data" and r._field == "temp")
assets = sql.from(
driverName: "postgres",
dataSourceName: "postgresql://${username}:${password}@localhost",
query:"SELECT * FROM temp-sensors"
)
join(tables: {data: telemetry, assets: assets}, on: ["sensorID"])
|> to(org: "my-org", bucket: "enriched-sensor-data")
Enrich data with external data
© 2020 InfluxData. All rights reserved. 46
import "sql"
import "influxdata/influxdb/secrets"
username = secrets.get(key: "POSTGRES_USER")
password = secrets.get(key: "POSTGRES_PASS")
telemetry = from(bucket: "sensor-data")
|> range(start: -task.every)
|> filter(fn: (r) => r._measurement == "sensor-data" and r._field == "temp")
assets = sql.from(
driverName: "postgres",
dataSourceName: "postgresql://${username}:${password}@localhost",
query:"SELECT * FROM temp-sensors"
)
join(tables: {data: telemetry, assets: assets}, on: ["sensorID"])
|> to(org: "my-org", bucket: "enriched-sensor-data")
Enrich data with external data
© 2020 InfluxData. All rights reserved. 47
import "sql"
import "influxdata/influxdb/secrets"
username = secrets.get(key: "POSTGRES_USER")
password = secrets.get(key: "POSTGRES_PASS")
telemetry = from(bucket: "sensor-data")
|> range(start: -task.every)
|> filter(fn: (r) => r._measurement == "sensor-data" and r._field == "temp")
assets = sql.from(
driverName: "postgres",
dataSourceName: "postgresql://${username}:${password}@localhost",
query:"SELECT * FROM temp-sensors"
)
join(tables: {data: telemetry, assets: assets}, on: ["sensorID"])
|> to(org: "my-org", bucket: "enriched-sensor-data")
Enrich data with external data
© 2020 InfluxData. All rights reserved. 48
import "sql"
import "influxdata/influxdb/secrets"
username = secrets.get(key: "POSTGRES_USER")
password = secrets.get(key: "POSTGRES_PASS")
telemetry = from(bucket: "sensor-data")
|> range(start: -task.every)
|> filter(fn: (r) => r._measurement == "sensor-data" and r._field == "temp")
assets = sql.from(
driverName: "postgres",
dataSourceName: "postgresql://${username}:${password}@localhost",
query:"SELECT * FROM temp-sensors"
)
join(tables: {data: telemetry, assets: assets}, on: ["sensorID"])
|> to(org: "my-org", bucket: "enriched-sensor-data")
Enrich data with external data
© 2020 InfluxData. All rights reserved. 49
import "sql"
import "influxdata/influxdb/secrets"
username = secrets.get(key: "POSTGRES_USER")
password = secrets.get(key: "POSTGRES_PASS")
telemetry = from(bucket: "sensor-data")
|> range(start: -task.every)
|> filter(fn: (r) => r._measurement == "sensor-data" and r._field == "temp")
assets = sql.from(
driverName: "postgres",
dataSourceName: "postgresql://${username}:${password}@localhost",
query:"SELECT * FROM temp-sensors"
)
join(tables: {data: telemetry, assets: assets}, on: ["sensorID"])
|> to(org: "my-org", bucket: "enriched-sensor-data")
Enrich data with external data
© 2020 InfluxData. All rights reserved. 50
_time sensorID location status _field _value
2020-06-01T00:12:00Z TM02001 SF1 .RM406 OK temp 70.32
2020-06-01T00:12:01Z TM02002 SF1.RM412 OK temp 70.45
2020-06-01T00:12:02Z TM02003 SF2.RM290 Requires service temp 98.41
Data Transfer
© 2020 InfluxData. All rights reserved. 52
© 2020 InfluxData. All rights reserved. 53
import "influxdata/influxdb/secrets"
import "influxdata/influxdb/tasks"
cloudToken = secrets.get(key: "INFLUXDB_CLOUD_TOKEN")
from(bucket: "telemetry")
|> range(start: tasks.lastSuccess(orTime: -task.every))
|> aggregateWindow(every: 5m, fn: mean)
|> to(
host: "https://us-west-2-1.aws.cloud2.influxdata.com",
org: "my-cloud-org",
bucket: "fleet",
token: cloudToken,
)
© 2020 InfluxData. All rights reserved. 54
© 2020 InfluxData. All rights reserved. 55
© 2020 InfluxData. All rights reserved. 56
© 2020 InfluxData. All rights reserved. 57
© 2020 InfluxData. All rights reserved. 58
Other Use Cases
● Data sanitization
● Machine learning
● Reports
● Event triggers
● Data generation
● and much more!!
© 2020 InfluxData. All rights reserved. 59
Thank you!
Time for some Q&A

More Related Content

What's hot

Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applicationsKexin Xie
 
Flux and InfluxDB 2.0 by Paul Dix
Flux and InfluxDB 2.0 by Paul DixFlux and InfluxDB 2.0 by Paul Dix
Flux and InfluxDB 2.0 by Paul DixInfluxData
 
WattGo: Analyses temps-réél de series temporelles avec Spark et Solr (Français)
WattGo: Analyses temps-réél de series temporelles avec Spark et Solr (Français)WattGo: Analyses temps-réél de series temporelles avec Spark et Solr (Français)
WattGo: Analyses temps-réél de series temporelles avec Spark et Solr (Français)DataStax Academy
 
Goal Based Data Production with Sim Simeonov
Goal Based Data Production with Sim SimeonovGoal Based Data Production with Sim Simeonov
Goal Based Data Production with Sim SimeonovDatabricks
 
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...InfluxData
 
RxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptRxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptViliam Elischer
 
Time Series Analysis for Network Secruity
Time Series Analysis for Network SecruityTime Series Analysis for Network Secruity
Time Series Analysis for Network Secruitymrphilroth
 
InfluxData Platform Future and Vision
InfluxData Platform Future and VisionInfluxData Platform Future and Vision
InfluxData Platform Future and VisionInfluxData
 
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...InfluxData
 
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...Spark Summit
 
AJUG April 2011 Cascading example
AJUG April 2011 Cascading exampleAJUG April 2011 Cascading example
AJUG April 2011 Cascading exampleChristopher Curtin
 
Writing Hadoop Jobs in Scala using Scalding
Writing Hadoop Jobs in Scala using ScaldingWriting Hadoop Jobs in Scala using Scalding
Writing Hadoop Jobs in Scala using ScaldingToni Cebrián
 
Hive Functions Cheat Sheet
Hive Functions Cheat SheetHive Functions Cheat Sheet
Hive Functions Cheat SheetHortonworks
 
RxJS101 - What you need to know to get started with RxJS tomorrow
RxJS101 - What you need to know to get started with RxJS tomorrowRxJS101 - What you need to know to get started with RxJS tomorrow
RxJS101 - What you need to know to get started with RxJS tomorrowViliam Elischer
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in RustInfluxData
 
Business Dashboards using Bonobo ETL, Grafana and Apache Airflow
Business Dashboards using Bonobo ETL, Grafana and Apache AirflowBusiness Dashboards using Bonobo ETL, Grafana and Apache Airflow
Business Dashboards using Bonobo ETL, Grafana and Apache AirflowRomain Dorgueil
 

What's hot (20)

Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applications
 
Flux and InfluxDB 2.0 by Paul Dix
Flux and InfluxDB 2.0 by Paul DixFlux and InfluxDB 2.0 by Paul Dix
Flux and InfluxDB 2.0 by Paul Dix
 
WattGo: Analyses temps-réél de series temporelles avec Spark et Solr (Français)
WattGo: Analyses temps-réél de series temporelles avec Spark et Solr (Français)WattGo: Analyses temps-réél de series temporelles avec Spark et Solr (Français)
WattGo: Analyses temps-réél de series temporelles avec Spark et Solr (Français)
 
Goal Based Data Production with Sim Simeonov
Goal Based Data Production with Sim SimeonovGoal Based Data Production with Sim Simeonov
Goal Based Data Production with Sim Simeonov
 
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
 
RxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScriptRxJS - The Reactive extensions for JavaScript
RxJS - The Reactive extensions for JavaScript
 
Time Series Analysis for Network Secruity
Time Series Analysis for Network SecruityTime Series Analysis for Network Secruity
Time Series Analysis for Network Secruity
 
InfluxData Platform Future and Vision
InfluxData Platform Future and VisionInfluxData Platform Future and Vision
InfluxData Platform Future and Vision
 
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...
 
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
Engineering Fast Indexes for Big-Data Applications: Spark Summit East talk by...
 
Scalding
ScaldingScalding
Scalding
 
AJUG April 2011 Cascading example
AJUG April 2011 Cascading exampleAJUG April 2011 Cascading example
AJUG April 2011 Cascading example
 
Writing Hadoop Jobs in Scala using Scalding
Writing Hadoop Jobs in Scala using ScaldingWriting Hadoop Jobs in Scala using Scalding
Writing Hadoop Jobs in Scala using Scalding
 
Rxjs ppt
Rxjs pptRxjs ppt
Rxjs ppt
 
Hive Functions Cheat Sheet
Hive Functions Cheat SheetHive Functions Cheat Sheet
Hive Functions Cheat Sheet
 
CellCoverage
CellCoverageCellCoverage
CellCoverage
 
Storm is coming
Storm is comingStorm is coming
Storm is coming
 
RxJS101 - What you need to know to get started with RxJS tomorrow
RxJS101 - What you need to know to get started with RxJS tomorrowRxJS101 - What you need to know to get started with RxJS tomorrow
RxJS101 - What you need to know to get started with RxJS tomorrow
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in Rust
 
Business Dashboards using Bonobo ETL, Grafana and Apache Airflow
Business Dashboards using Bonobo ETL, Grafana and Apache AirflowBusiness Dashboards using Bonobo ETL, Grafana and Apache Airflow
Business Dashboards using Bonobo ETL, Grafana and Apache Airflow
 

Similar to Scott Anderson [InfluxData] | InfluxDB Tasks – Beyond Downsampling | InfluxDays Virtual Experience NA 2020

9:40 am InfluxDB 2.0 and Flux – The Road Ahead Paul Dix, Founder and CTO | ...
 9:40 am InfluxDB 2.0 and Flux – The Road Ahead  Paul Dix, Founder and CTO | ... 9:40 am InfluxDB 2.0 and Flux – The Road Ahead  Paul Dix, Founder and CTO | ...
9:40 am InfluxDB 2.0 and Flux – The Road Ahead Paul Dix, Founder and CTO | ...InfluxData
 
Balaji Palani [InfluxData] | InfluxDB Tasks Overview | InfluxDays 2022
Balaji Palani [InfluxData] | InfluxDB Tasks Overview | InfluxDays 2022Balaji Palani [InfluxData] | InfluxDB Tasks Overview | InfluxDays 2022
Balaji Palani [InfluxData] | InfluxDB Tasks Overview | InfluxDays 2022InfluxData
 
Tools for Making Machine Learning more Reactive
Tools for Making Machine Learning more ReactiveTools for Making Machine Learning more Reactive
Tools for Making Machine Learning more ReactiveJeff Smith
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every dayVadym Khondar
 
Scale 16x: Terraform all the Things
Scale 16x: Terraform all the ThingsScale 16x: Terraform all the Things
Scale 16x: Terraform all the ThingsNathan Handler
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsFrancois Zaninotto
 
Apache Spark for Library Developers with William Benton and Erik Erlandson
 Apache Spark for Library Developers with William Benton and Erik Erlandson Apache Spark for Library Developers with William Benton and Erik Erlandson
Apache Spark for Library Developers with William Benton and Erik ErlandsonDatabricks
 
Monitoring with Prometheus
Monitoring with PrometheusMonitoring with Prometheus
Monitoring with PrometheusShiao-An Yuan
 
Flask patterns
Flask patternsFlask patterns
Flask patternsit-people
 
TDC2018SP | Trilha Go - Processando analise genetica em background com Go
TDC2018SP | Trilha Go - Processando analise genetica em background com GoTDC2018SP | Trilha Go - Processando analise genetica em background com Go
TDC2018SP | Trilha Go - Processando analise genetica em background com Gotdc-globalcode
 
mobl - model-driven engineering lecture
mobl - model-driven engineering lecturemobl - model-driven engineering lecture
mobl - model-driven engineering lecturezefhemel
 
R (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support SystemR (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support SystemMaithreya Chakravarthula
 
Emerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonEmerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonAlex Payne
 
Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108Mathias Herberts
 
Exactly once with spark streaming
Exactly once with spark streamingExactly once with spark streaming
Exactly once with spark streamingQuentin Ambard
 

Similar to Scott Anderson [InfluxData] | InfluxDB Tasks – Beyond Downsampling | InfluxDays Virtual Experience NA 2020 (20)

9:40 am InfluxDB 2.0 and Flux – The Road Ahead Paul Dix, Founder and CTO | ...
 9:40 am InfluxDB 2.0 and Flux – The Road Ahead  Paul Dix, Founder and CTO | ... 9:40 am InfluxDB 2.0 and Flux – The Road Ahead  Paul Dix, Founder and CTO | ...
9:40 am InfluxDB 2.0 and Flux – The Road Ahead Paul Dix, Founder and CTO | ...
 
Balaji Palani [InfluxData] | InfluxDB Tasks Overview | InfluxDays 2022
Balaji Palani [InfluxData] | InfluxDB Tasks Overview | InfluxDays 2022Balaji Palani [InfluxData] | InfluxDB Tasks Overview | InfluxDays 2022
Balaji Palani [InfluxData] | InfluxDB Tasks Overview | InfluxDays 2022
 
Tools for Making Machine Learning more Reactive
Tools for Making Machine Learning more ReactiveTools for Making Machine Learning more Reactive
Tools for Making Machine Learning more Reactive
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Reactive programming every day
Reactive programming every dayReactive programming every day
Reactive programming every day
 
Scale 16x: Terraform all the Things
Scale 16x: Terraform all the ThingsScale 16x: Terraform all the Things
Scale 16x: Terraform all the Things
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node js
 
Apache Spark for Library Developers with William Benton and Erik Erlandson
 Apache Spark for Library Developers with William Benton and Erik Erlandson Apache Spark for Library Developers with William Benton and Erik Erlandson
Apache Spark for Library Developers with William Benton and Erik Erlandson
 
Monitoring with Prometheus
Monitoring with PrometheusMonitoring with Prometheus
Monitoring with Prometheus
 
Flask patterns
Flask patternsFlask patterns
Flask patterns
 
TDC2018SP | Trilha Go - Processando analise genetica em background com Go
TDC2018SP | Trilha Go - Processando analise genetica em background com GoTDC2018SP | Trilha Go - Processando analise genetica em background com Go
TDC2018SP | Trilha Go - Processando analise genetica em background com Go
 
CAVE Overview
CAVE OverviewCAVE Overview
CAVE Overview
 
mobl - model-driven engineering lecture
mobl - model-driven engineering lecturemobl - model-driven engineering lecture
mobl - model-driven engineering lecture
 
R (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support SystemR (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support System
 
Emerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonEmerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the Horizon
 
Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108Artimon - Apache Flume (incubating) NYC Meetup 20111108
Artimon - Apache Flume (incubating) NYC Meetup 20111108
 
Exactly once with spark streaming
Exactly once with spark streamingExactly once with spark streaming
Exactly once with spark streaming
 
Analytics with Spark
Analytics with SparkAnalytics with Spark
Analytics with Spark
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
 
Terraform at Scale
Terraform at ScaleTerraform at Scale
Terraform at Scale
 

More from InfluxData

Announcing InfluxDB Clustered
Announcing InfluxDB ClusteredAnnouncing InfluxDB Clustered
Announcing InfluxDB ClusteredInfluxData
 
Best Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow EcosystemBest Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow EcosystemInfluxData
 
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...InfluxData
 
Power Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDBPower Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDBInfluxData
 
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base InfluxData
 
Build an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING StackBuild an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING StackInfluxData
 
Meet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using RustMeet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using RustInfluxData
 
Introducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud DedicatedIntroducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud DedicatedInfluxData
 
Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB InfluxData
 
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...InfluxData
 
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...InfluxData
 
Introducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage EngineIntroducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage EngineInfluxData
 
Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena InfluxData
 
Understanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage EngineUnderstanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage EngineInfluxData
 
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDBStreamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDBInfluxData
 
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...InfluxData
 
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022InfluxData
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022InfluxData
 
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...InfluxData
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022InfluxData
 

More from InfluxData (20)

Announcing InfluxDB Clustered
Announcing InfluxDB ClusteredAnnouncing InfluxDB Clustered
Announcing InfluxDB Clustered
 
Best Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow EcosystemBest Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow Ecosystem
 
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
 
Power Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDBPower Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDB
 
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
 
Build an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING StackBuild an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING Stack
 
Meet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using RustMeet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using Rust
 
Introducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud DedicatedIntroducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud Dedicated
 
Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB
 
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
 
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
 
Introducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage EngineIntroducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage Engine
 
Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena
 
Understanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage EngineUnderstanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage Engine
 
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDBStreamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
 
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
 
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
 
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
 

Recently uploaded

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Scott Anderson [InfluxData] | InfluxDB Tasks – Beyond Downsampling | InfluxDays Virtual Experience NA 2020

  • 1. Scott Anderson Senior Technical Writer & Technical Lead of the Docs team @ InfluxData InfluxDB Tasks Beyond Downsampling
  • 2. © 2020 InfluxData. All rights reserved. 2 What is an InfluxDB task? A scheduled Flux script
  • 3. © 2020 InfluxData. All rights reserved. 3 Why tasks? ● Automate repeated operations ● A replacement for Continuous Queries (CQs) in InfluxDB Cloud and InfluxDB 2.0
  • 4. © 2020 InfluxData. All rights reserved. 4 Downsampling cascade
  • 5. © 2020 InfluxData. All rights reserved. 5 CREATE CONTINUOUS QUERY "downsample-daily" ON "my-db" BEGIN SELECT mean("example-field") INTO "average-example-measurement" FROM "example-measurement" GROUP BY time(1h) END
  • 6. © 2020 InfluxData. All rights reserved. 6 from(bucket: "my-bucket") |> range(start: tasks.lastSuccess(orTime: -task.every) |> filter(fn: (r) => r._measurement == "example-m" and r._field == "value" ) |> aggregateWindow(every: 1h, fn: mean()) |> to(bucket: "downsampled-daily", org: "my-org")
  • 7. © 2020 InfluxData. All rights reserved. 7 Downsampling InfluxDB Template github.com/influxdata/community-templates
  • 8. © 2020 InfluxData. All rights reserved. 8
  • 9. © 2020 InfluxData. All rights reserved. 9
  • 10. and the potential of Flux BEYOND Downsampling
  • 12. © 2020 InfluxData. All rights reserved. 12
  • 13. © 2020 InfluxData. All rights reserved. 13 import "influxdata/influxdb/monitor" import "influxdata/influxdb/tasks" import "influxdata/influxdb/v1" check = {_check_id: "00000000deadbeef", _check_name: "Average memory monitor", _type: "threshold", tags: {}} task_data = from(bucket: "my-bucket") |> range(start: tasks.lastSuccess(orTime: -task.every), stop: now()) |> filter(fn: (r) => r._measurement == "telegraf" and r._field == "mem") |> mean() ok = (r) => r._value <= 60.0 crit = (r) => r._value > 95.0 warn = (r) => r._value > 80.0 and r._value <= 95.0 info = (r) => r._value > 60.0 and r._value <= 80.0 messageFn = (r) => ("Average mem check: ${r.host}'s average memory usage is ${r._value}%.") task_data |> v1.fieldsAsCols() |> monitor.check(data: check, messageFn: messageFn, ok: ok, crit: crit, warn: warn, info: info) System-generated check task
  • 14. © 2020 InfluxData. All rights reserved. 14 import "influxdata/influxdb/monitor" import "influxdata/influxdb/tasks" import "influxdata/influxdb/v1" check = {_check_id: "00000000deadbeef", _check_name: "Average memory monitor", _type: "threshold", tags: {}} task_data = from(bucket: "my-bucket") |> range(start: tasks.lastSuccess(orTime: -task.every), stop: now()) |> filter(fn: (r) => r._measurement == "telegraf" and r._field == "mem") |> mean() ok = (r) => r._value <= 60.0 crit = (r) => r._value > 95.0 warn = (r) => r._value > 80.0 and r._value <= 95.0 info = (r) => r._value > 60.0 and r._value <= 80.0 messageFn = (r) => ("Average mem check: ${r.host}'s average memory usage is ${r._value}%.") task_data |> v1.fieldsAsCols() |> monitor.check(data: check, messageFn: messageFn, ok: ok, crit: crit, warn: warn, info: info) System-generated check task
  • 15. © 2020 InfluxData. All rights reserved. 15 import "influxdata/influxdb/monitor" import "influxdata/influxdb/tasks" import "influxdata/influxdb/v1" check = {_check_id: "00000000deadbeef", _check_name: "Average memory monitor", _type: "threshold", tags: {}} task_data = from(bucket: "my-bucket") |> range(start: tasks.lastSuccess(orTime: -task.every), stop: now()) |> filter(fn: (r) => r._measurement == "telegraf" and r._field == "mem") |> mean() ok = (r) => r._value <= 60.0 crit = (r) => r._value > 95.0 warn = (r) => r._value > 80.0 and r._value <= 95.0 info = (r) => r._value > 60.0 and r._value <= 80.0 messageFn = (r) => ("Average mem check: ${r.host}'s average memory usage is ${r._value}%.") task_data |> v1.fieldsAsCols() |> monitor.check(data: check, messageFn: messageFn, ok: ok, crit: crit, warn: warn, info: info) System-generated check task
  • 16. © 2020 InfluxData. All rights reserved. 16
  • 17. © 2020 InfluxData. All rights reserved. 17 import "influxdata/influxdb/monitor" import "influxdata/influxdb/tasks" import "influxdata/influxdb/v1" check = {_check_id: "00000000deadbeef", _check_name: "Average memory monitor", _type: "threshold", tags: {}} task_data = from(bucket: "my-bucket") |> range(start: tasks.lastSuccess(orTime: -task.every), stop: now()) |> filter(fn: (r) => r._measurement == "telegraf" and r._field == "mem") |> mean() ok = (r) => r._value <= 60.0 crit = (r) => r._value > 95.0 warn = (r) => r._value > 80.0 and r._value <= 95.0 info = (r) => r._value > 60.0 and r._value <= 80.0 messageFn = (r) => ("Average mem check: ${r.host}'s average memory usage is ${r._value}%.") task_data |> v1.fieldsAsCols() |> monitor.check(data: check, messageFn: messageFn, ok: ok, crit: crit, warn: warn, info: info) System-generated check task
  • 18. © 2020 InfluxData. All rights reserved. 18 import "influxdata/influxdb/monitor" import "influxdata/influxdb/tasks" import "influxdata/influxdb/v1" check = {_check_id: "00000000deadbeef", _check_name: "Average memory monitor", _type: "threshold", tags: {}} task_data = from(bucket: "my-bucket") |> range(start: tasks.lastSuccess(orTime: -task.every), stop: now()) |> filter(fn: (r) => r._measurement == "telegraf" and r._field == "mem") |> mean() ok = (r) => r._value <= 60.0 crit = (r) => r._value > 95.0 warn = (r) => r._value > 80.0 and r._value <= 95.0 info = (r) => r._value > 60.0 and r._value <= 80.0 messageFn = (r) => ("Average mem check: ${r.host}'s average memory usage is ${r._value}%.") task_data |> v1.fieldsAsCols() |> monitor.check(data: check, messageFn: messageFn, ok: ok, crit: crit, warn: warn, info: info) System-generated check task
  • 19. © 2020 InfluxData. All rights reserved. 19
  • 20. © 2020 InfluxData. All rights reserved. 20 import "influxdata/influxdb/monitor" import "influxdata/influxdb/slack" endpoint = slack.endpoint( url: "https://slack.com/api/chat.postMessage", token: "SLACK_TOKEN") ) monitor.from( start: -task.every, fn: (r) => r._level == "crit" ) |> endpoint(mapFn: (r) => ({ r with channel: "alerts", text: r.message, color: "danger"}))() System-generated notification task
  • 21. © 2020 InfluxData. All rights reserved. 21 import "influxdata/influxdb/monitor" import "influxdata/influxdb/slack" endpoint = slack.endpoint( url: "https://slack.com/api/chat.postMessage", token: "SLACK_TOKEN") ) monitor.from( start: -task.every, fn: (r) => r._level == "crit" ) |> endpoint(mapFn: (r) => ({ r with channel: "alerts", text: r.message, color: "danger"}))() System-generated notification task
  • 22. © 2020 InfluxData. All rights reserved. 22 import "influxdata/influxdb/monitor" import "influxdata/influxdb/slack" endpoint = slack.endpoint( url: "https://slack.com/api/chat.postMessage", token: "SLACK_TOKEN") ) monitor.from( start: -task.every, fn: (r) => r._level == "crit" ) |> endpoint(mapFn: (r) => ({ r with channel: "alerts", text: r.message, color: "danger"}))() System-generated notification task
  • 23. © 2020 InfluxData. All rights reserved. 23 *
  • 24. Simple Custom Alerts Send alerts without using InfluxDB checks & notifications
  • 25. © 2020 InfluxData. All rights reserved. 25 import "influxata/influxdb/tasks" import "influxata/influxdb/slack" import anomaly "contrib/anaisdg/anomalydetection" toSlack = slack.endpoint( url: "https://slack.com/api/chat.postMessage", token: secrets.get(key: "SLACK_TOKEN") ) from(bucket: "example") |> range(start: tasks.lastSuccess(orTime: -task.every)) |> filter(fn: (r) => r._measurement == "m") |> anomaly.mad() |> filter(fn: (r) => r.level == "anomaly") |> toSlack( mapFn: (r) => { r with channel: "anomalies", text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}", color: "danger" } )() Custom anomaly detection alert
  • 26. © 2020 InfluxData. All rights reserved. 26 import "influxata/influxdb/tasks" import "influxata/influxdb/slack" import anomaly "contrib/anaisdg/anomalydetection" toSlack = slack.endpoint( url: "https://slack.com/api/chat.postMessage", token: secrets.get(key: "SLACK_TOKEN") ) from(bucket: "example") |> range(start: tasks.lastSuccess(orTime: -task.every)) |> filter(fn: (r) => r._measurement == "m") |> anomaly.mad() |> filter(fn: (r) => r.level == "anomaly") |> toSlack( mapFn: (r) => { r with channel: "anomalies", text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}", color: "danger" } )() Custom anomaly detection alert
  • 27. © 2020 InfluxData. All rights reserved. 27 import "influxata/influxdb/tasks" import "influxata/influxdb/slack" import anomaly "contrib/anaisdg/anomalydetection" toSlack = slack.endpoint( url: "https://slack.com/api/chat.postMessage", token: secrets.get(key: "SLACK_TOKEN") ) from(bucket: "example") |> range(start: tasks.lastSuccess(orTime: -task.every)) |> filter(fn: (r) => r._measurement == "m") |> anomaly.mad() |> filter(fn: (r) => r.level == "anomaly") |> toSlack( mapFn: (r) => { r with channel: "anomalies", text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}", color: "danger" } )() Custom anomaly detection alert
  • 28. © 2020 InfluxData. All rights reserved. 28 import "influxata/influxdb/tasks" import "influxata/influxdb/slack" import anomaly "contrib/anaisdg/anomalydetection" toSlack = slack.endpoint( url: "https://slack.com/api/chat.postMessage", token: secrets.get(key: "SLACK_TOKEN") ) from(bucket: "example") |> range(start: tasks.lastSuccess(orTime: -task.every)) |> filter(fn: (r) => r._measurement == "m") |> anomaly.mad() |> filter(fn: (r) => r.level == "anomaly") |> toSlack( mapFn: (r) => { r with channel: "anomalies", text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}", color: "danger" } )() Custom anomaly detection alert
  • 29. © 2020 InfluxData. All rights reserved. 29 import "influxata/influxdb/tasks" import "influxata/influxdb/slack" import anomaly "contrib/anaisdg/anomalydetection" toSlack = slack.endpoint( url: "https://slack.com/api/chat.postMessage", token: secrets.get(key: "SLACK_TOKEN") ) from(bucket: "example") |> range(start: tasks.lastSuccess(orTime: -task.every)) |> filter(fn: (r) => r._measurement == "m") |> anomaly.mad() |> filter(fn: (r) => r.level == "anomaly") |> toSlack( mapFn: (r) => { r with channel: "anomalies", text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}", color: "danger" } )() Custom anomaly detection alert
  • 30. © 2020 InfluxData. All rights reserved. 30 import "influxata/influxdb/tasks" import "influxata/influxdb/slack" import anomaly "contrib/anaisdg/anomalydetection" toSlack = slack.endpoint( url: "https://slack.com/api/chat.postMessage", token: secrets.get(key: "SLACK_TOKEN") ) from(bucket: "example") |> range(start: tasks.lastSuccess(orTime: -task.every)) |> filter(fn: (r) => r._measurement == "m") |> anomaly.mad() |> filter(fn: (r) => r.level == "anomaly") |> toSlack( mapFn: (r) => { r with channel: "anomalies", text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}", color: "danger" } )() Custom anomaly detection alert
  • 31. © 2020 InfluxData. All rights reserved. 31 import "influxata/influxdb/tasks" import "influxata/influxdb/slack" import anomaly "contrib/anaisdg/anomalydetection" toSlack = slack.endpoint( url: "https://slack.com/api/chat.postMessage", token: secrets.get(key: "SLACK_TOKEN") ) from(bucket: "example") |> range(start: tasks.lastSuccess(orTime: -task.every)) |> filter(fn: (r) => r._measurement == "m") |> anomaly.mad() |> filter(fn: (r) => r.level == "anomaly") |> toSlack( mapFn: (r) => { r with channel: "anomalies", text: "An anomaly has been detected on ${r.host}. ${r._field} is ${r._value}", color: "danger" } )() Custom anomaly detection alert Execute generated function
  • 33. © 2020 InfluxData. All rights reserved. 33 import "csv" csvData = "#datatype,string,long,dateTime:RFC3339,string,double #group,false,false,false,true,false #default,,,,, ,result,table,_time,region,_value ,,0,2018-05-08T20:50:00Z,east,15.43 ,,0,2018-05-08T20:50:20Z,east,59.25 ,,1,2018-05-08T20:50:00Z,west,62.73 " csv.from(csv:csvData) |> to(org: "my-org", bucket: "my-bucket") Write data using annotated CSV
  • 34. © 2020 InfluxData. All rights reserved. 34 import "experimental/csv" csv.from(url: "https://influx-testdata.s3.amazonaws.com/noaa.csv") |> to(org: "my-org", bucket: "noaa") Write data using remote annotated CSV
  • 35. © 2020 InfluxData. All rights reserved. 35 import "experimental/array" data = [ {_time: 2018-05-08T20:50:00Z, region: "east", _value: 15.43}, {_time: 2018-05-08T20:50:20Z, region: "east", _value: 59.25}, {_time: 2018-05-08T20:50:00Z, region: "west", _value: 62.73} ] array.from(rows: data) |> to(org: "my-org", bucket: "my-bucket") Write data with using an array of records
  • 36. © 2020 InfluxData. All rights reserved. 36 // ... response = http.get( url: "http://localhost:8086/health", headers: {Authorization: "Token mYsuP3rS3cRe7T0kEn"} ) responseBody = response.body seedRow = [{_time: now()}] array.from(rows: seedRow) |> map(fn: (r) => { body = json.parse(data: responseBody) return { r with _measurement: "monitoring", _field: "influxdb_status", _value: body.message, name: body.name } }) |> to(org: "my-org", bucket: "my-bucket") Write data with using an HTTP response
  • 37. © 2020 InfluxData. All rights reserved. 37 // ... response = http.get( url: "http://localhost:8086/health", headers: {Authorization: "Token mYsuP3rS3cRe7T0kEn"} ) responseBody = response.body seedRow = [{_time: now()}] array.from(rows: seedRow) |> map(fn: (r) => { body = json.parse(data: responseBody) return { r with _measurement: "monitoring", _field: "influxdb_status", _value: body.message, name: body.name } }) |> to(org: "my-org", bucket: "my-bucket") Write data with using an HTTP response
  • 38. © 2020 InfluxData. All rights reserved. 38 // ... response = http.get( url: "http://localhost:8086/health", headers: {Authorization: "Token mYsuP3rS3cRe7T0kEn"} ) responseBody = response.body seedRow = [{_time: now()}] array.from(rows: seedRow) |> map(fn: (r) => { body = json.parse(data: responseBody) return { r with _measurement: "monitoring", _field: "influxdb_status", _value: body.message, name: body.name } }) |> to(org: "my-org", bucket: "my-bucket") Write data with using an HTTP response
  • 39. © 2020 InfluxData. All rights reserved. 39
  • 40. © 2020 InfluxData. All rights reserved. 40 import "experimental/prometheus" prometheus.scrape(url: "http://localhost:8086/metrics") |> to( org: "my-org", bucket: "my-bucket" ) Scrape data from a Prometheus endpoint
  • 41. © 2020 InfluxData. All rights reserved. 41 import "influxdata/influxdb/secrets" import "sql" username = secrets.get(key: "POSTGRES_USER") password = secrets.get(key: "POSTGRES_PASS") sql.from( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost", query:"SELECT * FROM example_table" ) Query a SQL datasource
  • 43. © 2020 InfluxData. All rights reserved. 43 join()
  • 44. © 2020 InfluxData. All rights reserved. 44 _time sensorID _field _value 2020-06-01T00:12:00Z TM02001 temp 70.32 2020-06-01T00:12:01Z TM02002 temp 70.45 2020-06-01T00:12:02Z TM02003 temp 98.41 sensorID location status TM02001 SF1.RM406 OK TM02002 SF1.RM412 OK TM02003 SF2.RM290 Requires service
  • 45. © 2020 InfluxData. All rights reserved. 45 import "sql" import "influxdata/influxdb/secrets" username = secrets.get(key: "POSTGRES_USER") password = secrets.get(key: "POSTGRES_PASS") telemetry = from(bucket: "sensor-data") |> range(start: -task.every) |> filter(fn: (r) => r._measurement == "sensor-data" and r._field == "temp") assets = sql.from( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost", query:"SELECT * FROM temp-sensors" ) join(tables: {data: telemetry, assets: assets}, on: ["sensorID"]) |> to(org: "my-org", bucket: "enriched-sensor-data") Enrich data with external data
  • 46. © 2020 InfluxData. All rights reserved. 46 import "sql" import "influxdata/influxdb/secrets" username = secrets.get(key: "POSTGRES_USER") password = secrets.get(key: "POSTGRES_PASS") telemetry = from(bucket: "sensor-data") |> range(start: -task.every) |> filter(fn: (r) => r._measurement == "sensor-data" and r._field == "temp") assets = sql.from( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost", query:"SELECT * FROM temp-sensors" ) join(tables: {data: telemetry, assets: assets}, on: ["sensorID"]) |> to(org: "my-org", bucket: "enriched-sensor-data") Enrich data with external data
  • 47. © 2020 InfluxData. All rights reserved. 47 import "sql" import "influxdata/influxdb/secrets" username = secrets.get(key: "POSTGRES_USER") password = secrets.get(key: "POSTGRES_PASS") telemetry = from(bucket: "sensor-data") |> range(start: -task.every) |> filter(fn: (r) => r._measurement == "sensor-data" and r._field == "temp") assets = sql.from( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost", query:"SELECT * FROM temp-sensors" ) join(tables: {data: telemetry, assets: assets}, on: ["sensorID"]) |> to(org: "my-org", bucket: "enriched-sensor-data") Enrich data with external data
  • 48. © 2020 InfluxData. All rights reserved. 48 import "sql" import "influxdata/influxdb/secrets" username = secrets.get(key: "POSTGRES_USER") password = secrets.get(key: "POSTGRES_PASS") telemetry = from(bucket: "sensor-data") |> range(start: -task.every) |> filter(fn: (r) => r._measurement == "sensor-data" and r._field == "temp") assets = sql.from( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost", query:"SELECT * FROM temp-sensors" ) join(tables: {data: telemetry, assets: assets}, on: ["sensorID"]) |> to(org: "my-org", bucket: "enriched-sensor-data") Enrich data with external data
  • 49. © 2020 InfluxData. All rights reserved. 49 import "sql" import "influxdata/influxdb/secrets" username = secrets.get(key: "POSTGRES_USER") password = secrets.get(key: "POSTGRES_PASS") telemetry = from(bucket: "sensor-data") |> range(start: -task.every) |> filter(fn: (r) => r._measurement == "sensor-data" and r._field == "temp") assets = sql.from( driverName: "postgres", dataSourceName: "postgresql://${username}:${password}@localhost", query:"SELECT * FROM temp-sensors" ) join(tables: {data: telemetry, assets: assets}, on: ["sensorID"]) |> to(org: "my-org", bucket: "enriched-sensor-data") Enrich data with external data
  • 50. © 2020 InfluxData. All rights reserved. 50 _time sensorID location status _field _value 2020-06-01T00:12:00Z TM02001 SF1 .RM406 OK temp 70.32 2020-06-01T00:12:01Z TM02002 SF1.RM412 OK temp 70.45 2020-06-01T00:12:02Z TM02003 SF2.RM290 Requires service temp 98.41
  • 52. © 2020 InfluxData. All rights reserved. 52
  • 53. © 2020 InfluxData. All rights reserved. 53 import "influxdata/influxdb/secrets" import "influxdata/influxdb/tasks" cloudToken = secrets.get(key: "INFLUXDB_CLOUD_TOKEN") from(bucket: "telemetry") |> range(start: tasks.lastSuccess(orTime: -task.every)) |> aggregateWindow(every: 5m, fn: mean) |> to( host: "https://us-west-2-1.aws.cloud2.influxdata.com", org: "my-cloud-org", bucket: "fleet", token: cloudToken, )
  • 54. © 2020 InfluxData. All rights reserved. 54
  • 55. © 2020 InfluxData. All rights reserved. 55
  • 56. © 2020 InfluxData. All rights reserved. 56
  • 57. © 2020 InfluxData. All rights reserved. 57
  • 58. © 2020 InfluxData. All rights reserved. 58 Other Use Cases ● Data sanitization ● Machine learning ● Reports ● Event triggers ● Data generation ● and much more!!
  • 59. © 2020 InfluxData. All rights reserved. 59 Thank you! Time for some Q&A