{% include JB/setup %}
InfluxDB is an open-source time series database (TSDB) developed by InfluxData. It is written in Go and optimized for fast, high-availability storage and retrieval of time series data in fields such as operations monitoring, application metrics, Internet of Things sensor data, and real-time analytics. This interpreter allows to perform queries in Flux Language in Zeppelin Notebook.
Basically, you can use
%influxdb from(bucket: "my-bucket") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "cpu") |> filter(fn: (r) => r.cpu == "cpu-total") |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
In this example we use data collected by [[inputs.cpu]]
Telegraf input plugin.
The result of Flux command can contain more one or more tables. In the case of multiple tables, each table is rendered as a separate %table structure. This example uses pivot
function to collect values from multiple tables into single table.
docker pull quay.io/influxdb/influxdb:nightly docker run --name influxdb -p 9999:9999 quay.io/influxdb/influxdb:nightly ## Post onBoarding request, to setup initial user (my-user@my-password), org (my-org) and bucketSetup (my-bucket)" curl -i -X POST http://localhost:9999/api/v2/setup -H 'accept: application/json' \ -d '{ "username": "my-user", "password": "my-password", "org": "my-org", "bucket": "my-bucket", "token": "my-token" }'