Skip to content

Commit f845011

Browse files
codebienolegbespalovoleiade
authored
New options for Prometheus rw output (#1366)
Documented the new options --------- Co-authored-by: Oleg Bespalov <[email protected]> Co-authored-by: Théo Crevon <[email protected]>
1 parent 3f03446 commit f845011

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Prometheus remote write.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,18 @@ k6 has special options for remote write output.
158158
| Name | Type | Description |
159159
| ---- | ---- | ----------- |
160160
| `K6_PROMETHEUS_RW_SERVER_URL` | `string` | URL of the Prometheus remote write implementation's endpoint. Default is ``http://localhost:9090/api/v1/write`` |
161-
| `K6_PROMETHEUS_RW_HEADERS_<here-the-header-key>` | list of `string` | Additional headers to include in the HTTP requests. `K6_PROMETHEUS_RW_HEADERS_X-MY-HEADER=foo`|
162-
| `K6_PROMETHEUS_RW_USERNAME` | `string` | User for the HTTP Basic authentication at the Prometheus remote write endpoint. |
163-
| `K6_PROMETHEUS_RW_PASSWORD` | `string` | Password for the HTTP Basic authentication at the Prometheus remote write endpoint. |
164-
| `K6_PROMETHEUS_RW_PUSH_INTERVAL` | `string` | Interval of the metrics' aggregation and upload to the endpoint. Default is `5s` |
161+
| `K6_PROMETHEUS_RW_HEADERS_<header-key>` | `string` | An additional header to include in the HTTP requests can be set using this described format. For example, `K6_PROMETHEUS_RW_HEADERS_MY-HEADER-CUSTOM-KEY=foo`. |
162+
| `K6_PROMETHEUS_RW_HTTP_HEADERS` | comma-separated list of key values | Additional headers to include in the HTTP requests. `K6_PROMETHEUS_RW_HTTP_HEADERS=key1:value1,key2:value2`. |
163+
| `K6_PROMETHEUS_RW_PUSH_INTERVAL` | `string` | Interval of the metrics' aggregation and upload to the endpoint. Default is `5s`. |
165164
| `K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM` | `boolean` | If true, it maps the all defined trend metrics as [Native Histograms](#prometheus-native-histogram). Default is `false`. |
166-
| `K6_PROMETHEUS_RW_TREND_STATS` | list of `string` | If Native Histogram is not enabled then it defines the stats functions to map for the all defined trend metrics. It's a comma-separated list of stats functions to include (e.g. `p(90),avg,sum`). Check the trend section to know the entire set of the supported stats. Default is `p(99)` |
165+
| `K6_PROMETHEUS_RW_TREND_STATS` | list of `string` | If Native Histogram is not enabled then it defines the stats functions to map for the all defined trend metrics. It's a comma-separated list of stats functions to include (e.g. `p(90),avg,sum`). Check the trend section to know the entire set of the supported stats. Default is `p(99)`. |
167166
| `K6_PROMETHEUS_RW_INSECURE_SKIP_TLS_VERIFY` | `boolean` | If true, the HTTP client skips TLS verification on the endpoint. Default is `false`. |
168167
| `K6_PROMETHEUS_RW_STALE_MARKERS` | `boolean` | If true, the output at the end of the test marks all the seen time series as stale. Default is `false`. |
168+
| `K6_PROMETHEUS_RW_USERNAME` | `string` | Username for the HTTP Basic authentication at the Prometheus remote write endpoint. |
169+
| `K6_PROMETHEUS_RW_PASSWORD` | `string` | Password for the HTTP Basic authentication at the Prometheus remote write endpoint. |
170+
| `K6_PROMETHEUS_RW_CLIENT_CERTIFICATE` | `string` | A path to the PEM (Privacy-Enhanced Mail) formatted client certificate. |
171+
| `K6_PROMETHEUS_RW_CLIENT_CERTIFICATE_KEY` | `string` | A path to the PEM formatted client private key. |
172+
| `K6_PROMETHEUS_RW_BEARER_TOKEN` | `string` | Sets the Authorization Bearer Token Header. |
169173
170174
### Stale trend metrics
171175
@@ -249,4 +253,4 @@ Clone the repository to get started and follow these steps for using the [docker
249253
250254
3. After running the test, visit [http://localhost:3000](http://localhost:3000). If you enabled native histograms, select the **k6 Prometheus (Native Histograms)** dashboard; otherwise, select the **k6 Prometheus** Dashboard.
251255
252-
![k6 Prometheus Dashboard](./images/Prometheus/k6-prometheus-dashboard.png)
256+
![k6 Prometheus Dashboard](./images/Prometheus/k6-prometheus-dashboard.png)

0 commit comments

Comments
 (0)