Prometheus Data Stream Parameters
The Prometheus plugin provides configurable data streams to use PromQL queries to fetch data.
Each configurable data stream exposes a set of parameters that lets you filter the data you retrieve. The following information describes the available configurable data streams and their parameters in detail.
PromQL
Parameter | Description |
|---|---|
Query | Enter a PromQL query to return data, for example: sum by (instance) (rate(kubedns_probe_dnsmasq_latency_ms_sum[1m])) / sum by (instance) (rate(kubedns_probe_dnsmasq_latency_ms_count[1m]))See the Prometheus documentation for help writing queries. |
Query type | Select the query type. Typically, Range queries are used for graphing results but some Instant queries can also return results over a time range:
|
Interval | If Range is selected as the Query type, select the time interval for the query:
|
Simple Query
The simple query data stream lets you configure a query parameters using the data stream parameters, rather than entering one directly.
Depending on the Metric you select to query, different parameters are displayed.
Parameter | Description |
|---|---|
Metric | Select a metric. If using the scoped data stream, the available metrics for the objects selected are listed, otherwise all metrics are listed. The list shows the metric name followed by the unit and metric type in brackets. The remaining parameters depend on the type of metric selected. Prometheus supports four types of metrics- counter, gauge, histogram and summary. |
Counter metric configuration
Parameter | Description |
|---|---|
Counter query type | Select the type of query:
|
Filter by label | Specify a label to filter by then configure the following
|
Filter by second label | Specify a second label to filter by then configure the following:
|
Aggregation | Select the type of label aggregation for each timestamp:
|
Group by | Choose which labels to aggregate:
|
Interval | If Rate per second over time is selected as the Counter query type, select the time interval for the query:
|
Gauge metric configuration
Parameter | Description |
|---|---|
Gauge query type | Select the type of query
|
Aggregation over time interval | Select the time-based aggregation. For a single value query this is evaluated over the whole timeframe. For a values over time query this is evaluated over each time interval (step).
|
Filter by label | Specify a label to filter by then configure the following:
|
Filter by second label | Specify a second label to filter by then configure the following:
|
Aggregation | Select the type of label aggregation for each timestamp:
|
Group by | Choose which labels to aggregate:
|
Interval | If Values over time is selected as the Gauge query type, select the time interval for the query:
|
Histogram metric configuration
Parameter | Description |
|---|---|
Histogram query type | Select the type of query:
|
Aggregation over time interval | If Sample values over time is selected as the query type, choose how to aggregate the individual sample values over each time interval (step):
|
Filter by label | Specify a label to filter by, then configure the following:
|
Filter by second label | Specify a second label to filter by, then configure the following:
|
Aggregation | Select the type of label aggregation for each timestamp:
|
Group by | Choose which labels to aggregate:
|
Interval | If Values over time is selected as the Histogram query type, select the time interval for the query:
|
Summary metric configuration
Parameter | Description |
|---|---|
Summary query type | Select the type of query:
|
Aggregation over time interval | If Sample values over time is selected as the query type, choose how to aggregate the individual sample values over each time interval (step):
|
Filter by label | Specify a label to filter by, then configure the following:
|
Filter by second label | Specify a second label to filter by, then configure the following:
|
Aggregation | Select the type of label aggregation for each timestamp:
|
Group by | Choose which labels to aggregate:
|
Interval | If Values over time is selected as the Summary query type, select the time interval for the query:
|