Vinay Kumar [InfluxData] | InfluxDB Tasks Demonstration | InfluxDays 2022

InfluxData
InfluxDataInfluxData
Vinay Kumar [InfluxData] | InfluxDB Tasks Demonstration | InfluxDays 2022
InfluxDB Tasks
Demonstration
Vinay Kumar - Senior Product Manager, InfluxData
See InfluxDB tasks in action in this session. We’ll cover how to get
started with tasks, how to set up invokable scripts, and look at some
ways to use them.
Vinay Kumar
Senior Product Manager, InfluxData
InfluxDB Tasks Demonstration
Platform Product Manager at InfluxData with a Cloud Infrastructure
and Networking background working at companies like MuleSoft,
Salesforce and Ericsson.
Agenda
1. Demonstrating Tasks and Invokable Scripts in
Action
Tasks and Invokable scripts in
Action
Using Tasks
/tasks
Augmented
Data
Relational Data
Alerts
Trigger Actions -
HTTP
Raw
Data
Tasks are a powerful automation tool:
● Queries run on the platform without the
need for any additional hardware, or OS
provisioning on customer infra.
● Run repetitive tasks like downsampling or
checking for error conditions and alerting
● Power of Flux - Query buckets, external
data, join data, compute data, trigger
actions, save to buckets, alert
Script
Using Invokable Scripts
● API Invokable scripts can be triggered to run Flux logic from applications
or workflow tools.
● Tasks can invoke scripts - improving Tasks management at scale.
/scripts
Tasks
Script
Input Parameters
Output
Tasks
Tasks
Tasks
Tasks
Tasks
Tasks
Create N Tasks passing
parameters to invoke the Script
/api/v2/scripts/{name}/invoke
Modify script to update Task logic
Create a reusable
and invokable Flux
asset
Driving Flux logic re-use on the platform
/api/v2/scripts/{name}/invoke
Invoke the script from your
application/workflow logic
See Tasks in Action
1. Walk through a simple downsampling Task
2. Run Tasks at scale with scripts
3. Create and invoke a useful script on demand
Parameterized script
{
"orgID": "0437f6d51b579000",
"name": "Downsampling",
"script": "
from(bucket: params.inBucket)
|> range(start: -5m)
|> filter(fn: (r) => r["_measurement"] == params.measurementName)
|> filter(fn: (r) => r["_field"] == params.fieldName)
|> mean(column: "_value")
|> rename(columns: {_stop: "_time"})
|> to(bucket: params.outBucket)",
"description": "demo invokable script for generic downsampling",
"language": "flux"
}
from(bucket: "client_a")
|> range(start: -15m)
|> filter(fn: (r) => r["_measurement"] == "airSensors")
|> filter(fn: (r) => r["_field"] == "temperature")
|> mean(column: "_value")
|> rename(columns: {_stop: "_time"})
|> to(bucket: "downsampled_client_a")
Task Logic Parameterized script logic
Celsius conversion script
Additional Resources
Free InfluxDB: OSS or Cloud - influxdata.com/cloud
Forums: community.influxdata.com
Slack: influxcommunity.slack.com
Reddit: r/InfluxData
Influx Community (GH): github.com/InfluxCommunity
Book: awesome.influxdata.com
Docs: docs.influxdata.com
Blogs: influxdata.com/blog
InfluxDB University: influxdata.com/university
How to guides: docs.influxdata.com/resources/how-to-guides/
T H A N K Y O U
1 of 12

More Related Content

Similar to Vinay Kumar [InfluxData] | InfluxDB Tasks Demonstration | InfluxDays 2022(20)

Lean Php PresentationLean Php Presentation
Lean Php Presentation
Alan Pinstein13.7K views
Pyramid Deployment and MaintenancePyramid Deployment and Maintenance
Pyramid Deployment and Maintenance
Jazkarta, Inc.2.3K views
Serverless in-actionServerless in-action
Serverless in-action
Assaf Gannon318 views
CI/CD and TDD in deploying kamailioCI/CD and TDD in deploying kamailio
CI/CD and TDD in deploying kamailio
Aleksandar Sosic318 views
Pyramid deploymentPyramid deployment
Pyramid deployment
Carlos de la Guardia2.4K views
Surekha_haoop_expSurekha_haoop_exp
Surekha_haoop_exp
surekhakadi370 views

More from InfluxData(20)

Announcing InfluxDB ClusteredAnnouncing InfluxDB Clustered
Announcing InfluxDB Clustered
InfluxData100 views

Recently uploaded(20)

Java Platform Approach 1.0 - Picnic MeetupJava Platform Approach 1.0 - Picnic Meetup
Java Platform Approach 1.0 - Picnic Meetup
Rick Ossendrijver24 views
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
METHOD AND SYSTEM FOR PREDICTING OPTIMAL LOAD FOR WHICH THE YIELD IS MAXIMUM ...
Prity Khastgir IPR Strategic India Patent Attorney Amplify Innovation24 views
ChatGPT and AI for Web DevelopersChatGPT and AI for Web Developers
ChatGPT and AI for Web Developers
Maximiliano Firtman161 views
Liqid: Composable CXL PreviewLiqid: Composable CXL Preview
Liqid: Composable CXL Preview
CXL Forum120 views
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)
CSUC - Consorci de Serveis Universitaris de Catalunya59 views

Vinay Kumar [InfluxData] | InfluxDB Tasks Demonstration | InfluxDays 2022

  • 2. InfluxDB Tasks Demonstration Vinay Kumar - Senior Product Manager, InfluxData
  • 3. See InfluxDB tasks in action in this session. We’ll cover how to get started with tasks, how to set up invokable scripts, and look at some ways to use them. Vinay Kumar Senior Product Manager, InfluxData InfluxDB Tasks Demonstration Platform Product Manager at InfluxData with a Cloud Infrastructure and Networking background working at companies like MuleSoft, Salesforce and Ericsson.
  • 4. Agenda 1. Demonstrating Tasks and Invokable Scripts in Action
  • 5. Tasks and Invokable scripts in Action
  • 6. Using Tasks /tasks Augmented Data Relational Data Alerts Trigger Actions - HTTP Raw Data Tasks are a powerful automation tool: ● Queries run on the platform without the need for any additional hardware, or OS provisioning on customer infra. ● Run repetitive tasks like downsampling or checking for error conditions and alerting ● Power of Flux - Query buckets, external data, join data, compute data, trigger actions, save to buckets, alert
  • 7. Script Using Invokable Scripts ● API Invokable scripts can be triggered to run Flux logic from applications or workflow tools. ● Tasks can invoke scripts - improving Tasks management at scale. /scripts Tasks Script Input Parameters Output Tasks Tasks Tasks Tasks Tasks Tasks Create N Tasks passing parameters to invoke the Script /api/v2/scripts/{name}/invoke Modify script to update Task logic Create a reusable and invokable Flux asset Driving Flux logic re-use on the platform /api/v2/scripts/{name}/invoke Invoke the script from your application/workflow logic
  • 8. See Tasks in Action 1. Walk through a simple downsampling Task 2. Run Tasks at scale with scripts 3. Create and invoke a useful script on demand
  • 9. Parameterized script { "orgID": "0437f6d51b579000", "name": "Downsampling", "script": " from(bucket: params.inBucket) |> range(start: -5m) |> filter(fn: (r) => r["_measurement"] == params.measurementName) |> filter(fn: (r) => r["_field"] == params.fieldName) |> mean(column: "_value") |> rename(columns: {_stop: "_time"}) |> to(bucket: params.outBucket)", "description": "demo invokable script for generic downsampling", "language": "flux" } from(bucket: "client_a") |> range(start: -15m) |> filter(fn: (r) => r["_measurement"] == "airSensors") |> filter(fn: (r) => r["_field"] == "temperature") |> mean(column: "_value") |> rename(columns: {_stop: "_time"}) |> to(bucket: "downsampled_client_a") Task Logic Parameterized script logic
  • 11. Additional Resources Free InfluxDB: OSS or Cloud - influxdata.com/cloud Forums: community.influxdata.com Slack: influxcommunity.slack.com Reddit: r/InfluxData Influx Community (GH): github.com/InfluxCommunity Book: awesome.influxdata.com Docs: docs.influxdata.com Blogs: influxdata.com/blog InfluxDB University: influxdata.com/university How to guides: docs.influxdata.com/resources/how-to-guides/
  • 12. T H A N K Y O U