query_influxdb_flux
Run custom Flux queries on InfluxDB to retrieve and parse time-series records for IT operations monitoring.
Instructions
Execute a Flux query against the local InfluxDB and return parsed records.
flux: Flux query string. The bucket is NOT auto-substituted — include
from(bucket:"<bucket>") |> range(start: -1h) |> ... yourself.
bucket: name surfaced in the response for context (does not modify the query).
Reads InfluxDB URL from config (influxdb.url, default localhost:8086) and the
org + token from the env vars named in influxdb.org_env / influxdb.token_env
(default INFLUXDB_ORG / INFLUXDB_TOKEN).
Returns: {bucket, row_count, columns, records (list of dicts), truncated_at}.
Records are capped at 500 rows to keep Claude's context manageable; if more
were returned, truncated_at: 500 appears in the response.
Returns {"error": "..."} on missing token, network failure, or Flux syntax error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flux | Yes | ||
| bucket | No | monitoring |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||