Skip to content

Commit a2ddb93

Browse files
Add InfluxDB v1 instructions to InfluxDB page (#1954)
* Add InfluxDB v1 instructions to InfluxDB page * Update docs/sources/k6/next/results-output/real-time/influxdb.md Co-authored-by: İnanç Gümüş <[email protected]> --------- Co-authored-by: İnanç Gümüş <[email protected]>
1 parent 35a29d4 commit a2ddb93

File tree

1 file changed

+22
-6
lines changed
  • docs/sources/k6/next/results-output/real-time

1 file changed

+22
-6
lines changed

docs/sources/k6/next/results-output/real-time/influxdb.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
11
---
22
title: 'InfluxDB'
3-
description: 'k6 has an output extension to store k6 metrics in InfluxDB v2. This document shows you how to configure this integration.'
3+
description: 'k6 has built-in support for InfluxDB v1, and provides an output extension to store k6 metrics in InfluxDB v2. This document shows you how to configure this integration.'
44
weight: 00
55
---
66

77
# InfluxDB
88

9+
k6 supports sending output metrics to InfluxDB v1.0 and v2.0.
10+
11+
## Send k6 metrics to InfluxDB v1.0
12+
13+
k6 has built-in support to send metrics to InfluxDB v1.0.
14+
15+
You can use the `--out` flag with the `influxdb` option:
16+
17+
```bash
18+
k6 run --out influxdb=http://localhost:8086/myk6db script.js
19+
```
20+
21+
The example command makes k6 connect to a local InfluxDB instance and send the results from the test to a database named `myk6db`. If the database doesn't exist, k6 creates one automatically.
22+
23+
## Send k6 metrics to InfluxDB v2.0
24+
925
Using the [InfluxDB extension](https://github.com/grafana/xk6-output-influxdb), you can store k6 metrics in [InfluxDB v2.0](https://docs.influxdata.com/influxdb/v2.0/) and analyze your performance results with Grafana or [other tools](https://docs.influxdata.com/influxdb/cloud-serverless/query-data/tools/).
1026

11-
## Build the k6 version
27+
### Build the k6 version
1228

1329
To build a k6 binary with the extension, first, make sure you have [Go](https://golang.org/doc/install) and [Git](https://git-scm.com/) installed on your machine.
1430

@@ -34,7 +50,7 @@ To learn more about how to build custom k6 versions, check out [xk6](https://git
3450

3551
{{< /admonition >}}
3652

37-
## Run the test
53+
### Run the test
3854

3955
Check that the InfluxDB instance to store the k6 metrics is running.
4056

@@ -54,7 +70,7 @@ k6 runs the test script and sends the [k6 metrics](https://grafana.com/docs/k6/<
5470

5571
![InfluxDB Data Explorer / k6 bucket](/media/docs/k6-oss/influxdb-data-explorer-k6-bucket.png)
5672

57-
## Options
73+
### Options
5874

5975
Here is the full list of options that can be configured and passed to the extension:
6076

@@ -71,10 +87,10 @@ Here is the full list of options that can be configured and passed to the extens
7187
| K6_INFLUXDB_PRECISION | 1ns | The timestamp [Precision](https://docs.influxdata.com/influxdb/v2.7/reference/glossary/#precision). |
7288
| K6_INFLUXDB_HTTP_PROXY | | Sets an HTTP proxy for the InfluxDB output. |
7389

74-
## Grafana Dashboards
90+
### Grafana Dashboards
7591

7692
You can use Grafana to query and visualize data from an InfluxDB instance. The instructions are available on [InfluxDB](https://docs.influxdata.com/influxdb/v2.7/tools/grafana/) and [Grafana](https://grafana.com/docs/grafana/latest/datasources/influxdb/).
7793

7894
You can also build a [custom Grafana dashboard](https://grafana.com/docs/k6/<K6_VERSION>/results-output/grafana-dashboards) to visualize the testing results in your own way.
7995

80-
For testing purposes, the [influxdb extension](https://github.com/grafana/xk6-output-influxdb) repository includes a [docker-compose setup](https://github.com/grafana/xk6-output-influxdb#docker-compose) with two basic dashboards.
96+
For testing purposes, the [InfluxDB extension](https://github.com/grafana/xk6-output-influxdb) repository includes a [docker-compose setup](https://github.com/grafana/xk6-output-influxdb#docker-compose) with two basic dashboards.

0 commit comments

Comments
 (0)