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
Returns the result of a PromQL query you write. Use a range query to plot a series across the timeframe, or an instant query for a single current value.
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
Build a query from parameters rather than writing PromQL directly. The parameters shown depend on the type of the metric you select.
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
The parameters shown when the selected metric is a counter. A counter only ever increases, so the query returns either the total increase across the timeframe or a rate per second.
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
The parameters shown when the selected metric is a gauge. A gauge moves up and down, so the query returns either its value at a single point or its values across the timeframe.
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
The parameters shown when the selected metric is a histogram. The query returns a total count of samples, a rate per second, or the sample values across the timeframe.
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
The parameters shown when the selected metric is a summary. As with a histogram, the query returns a total count, a rate per second, or the sample values across the timeframe.
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:
|