Skip to content

Commit

Permalink
promrw-output: Documented the new options
Browse files Browse the repository at this point in the history
  • Loading branch information
codebien committed Oct 9, 2023
1 parent 04c2065 commit c84f9ba
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,18 @@ k6 has special options for remote write output.
| Name | Type | Description |
| ---- | ---- | ----------- |
| `K6_PROMETHEUS_RW_SERVER_URL` | `string` | URL of the Prometheus remote write implementation's endpoint. Default is ``http://localhost:9090/api/v1/write`` |
| `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`|
| `K6_PROMETHEUS_RW_USERNAME` | `string` | User for the HTTP Basic authentication at the Prometheus remote write endpoint. |
| `K6_PROMETHEUS_RW_PASSWORD` | `string` | Password for the HTTP Basic authentication at the Prometheus remote write endpoint. |
| `K6_PROMETHEUS_RW_PUSH_INTERVAL` | `string` | Interval of the metrics' aggregation and upload to the endpoint. Default is `5s` |
| `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`. |
| `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`. |
| `K6_PROMETHEUS_RW_PUSH_INTERVAL` | `string` | Interval of the metrics' aggregation and upload to the endpoint. Default is `5s`. |
| `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`. |
| `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)` |
| `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)`. |
| `K6_PROMETHEUS_RW_INSECURE_SKIP_TLS_VERIFY` | `boolean` | If true, the HTTP client skips TLS verification on the endpoint. Default is `false`. |
| `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`. |
| `K6_PROMETHEUS_RW_USERNAME` | `string` | User for the HTTP Basic authentication at the Prometheus remote write endpoint. |
| `K6_PROMETHEUS_RW_PASSWORD` | `string` | Password for the HTTP Basic authentication at the Prometheus remote write endpoint. |
| `K6_PROMETHEUS_RW_CLIENT_CERTIFICATE` | `string` | Certifivate to authenticate via mTLS. |
| `K6_PROMETHEUS_RW_CLIENT_CERTIFICATE_KEY` | `string` | Key to authenticate via mTLS. |
| `K6_PROMETHEUS_RW_BEARER_TOKEN` | `string` | Set the Authorization header following the Bearer token format. |
### Stale trend metrics
Expand Down Expand Up @@ -249,4 +253,4 @@ Clone the repository to get started and follow these steps for using the [docker
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.
![k6 Prometheus Dashboard](./images/Prometheus/k6-prometheus-dashboard.png)
![k6 Prometheus Dashboard](./images/Prometheus/k6-prometheus-dashboard.png)

0 comments on commit c84f9ba

Please sign in to comment.