Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mixing metrics and logs with Grafana + Influx

David
June 13, 2019

Mixing metrics and logs with Grafana + Influx

Grafana’s new Explore area is adding support for both metric and logs display for the Influx datasource. This allows you to quickly access your metrics, and as part of troubleshooting, bring up related logs. We’ll also look at the latest support for Flux inside Grafana.

David

June 13, 2019
Tweet

More Decks by David

Other Decks in Technology

Transcript

  1. I’m David Working on Explore, Prometheus, and Loki at Grafana

    Labs Previously: Unifying Metrics/Logs/Traces at Kausal, Weavescope [email protected] Twitter: @davkals
  2. Dashboard with Influx <= 1.7 - Graphical query builder -

    InfluxQL - Database authentication via username/password
  3. New: Explore with Influx <= 1.7 - New section for

    ad-hoc queries - Same query builder
  4. Log aggregation with Influx - Central place to store your

    application logs - Revisit logs after apps/services/hosts have crashed - Basic analytics support with query language - Influx is not designed for logs, but may be “good enough” - Running a second system for logs adds operational complexity
  5. host1 InfluxDB host2 - Measurement: “logs” - Fields: - “message”

    - “details” - Tags: - “datacenter” - “host” - “app” Modelling log streams app1 app2 db1 db2 app1 dc1
  6. New: Log viewer - New view in Explore (master, and

    soon 6.3) - Works with Influx 1.7 - Tag-based filtering for log streams - Will work with v2 shortly
  7. Flux datasource for Influx >= 2.0 - External datasource (for

    now), latest version: 5.3.1 - Flux expression editor - Supports token authentication (Influx v2 only) - Install via Grafana CLI: grafana-cli plugins install grafana-influxdb-flux-datasource Repo for filing issues: https://github.com/grafana/influxdb-flux-datasource
  8. Try it out (1/3) $> docker run --name influxdb -p

    9999:9999 quay.io/influxdb/influxdb:2.0.0-alpha
  9. Try it out (2/3) $> grafana-cli plugins install grafana-influxdb-flux-datasource $>

    export INFLUX_TOKEN=<TOKEN> $> telegraf --config http://localhost:9999/api/v2/telegrafs/<CONFIG_ID>
  10. Outlook - Unifying Flux and Influx datasources - Adding version

    drop-down to datasource config page - Explore and panels render editors based on version - Datasource uses appropriate API paths and authentication mechanism - Logs in Flux datasource - Improve tag filtering UX