Query over a relative time range
kairosdb_query_rangeRetrieve time-series data from KairosDB for a metric over a relative range, with optional tag filters and aggregation. Get timestamped points with min, max, and average statistics.
Instructions
Queries KairosDB for a metric's data over a relative time range (e.g. the last 24 hours).
Typical use cases:
"Give me the CPU usage data for server web-01 over the last 7 days"
"Show me the memory usage from last week"
Args:
metric_name: Exact KairosDB metric name
tags: Tag filters (e.g. {"host": ["web-01"]})
range_value: Duration to look back (default: 24)
range_unit: Unit (hours/days/weeks/..., default: hours)
aggregator: Optional aggregation function (avg/min/max/sum/count)
sampling_value / sampling_unit: Window size if aggregation is enabled
limit: Max number of points (default: 1000, max: 10,000)
response_format: "markdown" (default) or "json"
Returns: Timestamped data points with statistics (min/max/avg).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | KairosDB tag filters. Ex: {"host": ["web-01"], "environment": ["production"]}. Each tag value is an array of strings (logical OR). | |
| limit | No | Maximum number of data points to return (max 10,000) | |
| aggregator | No | If provided, aggregates the data with this function. Leave empty for raw data. | avg |
| range_unit | No | Time unit: milliseconds | seconds | minutes | hours | days | weeks | months | years | hours |
| metric_name | Yes | Exact KairosDB metric name (e.g. server.cpu_usage, network.latency) | |
| range_value | No | Duration of the time range (e.g. 24 for the last 24 hours) | |
| sampling_unit | No | Window unit (required if aggregator is set) | hours |
| sampling_value | No | Aggregation window size (required if aggregator is set) | |
| response_format | No | markdown |