Skip to content

Commit f1075dd

Browse files
New Grafana dashboards docs + InfluxDB update (#1161)
* [feat] add pathfinder page for grafana dashboards * Rewrite `Grafana dashboards` first version * Reorder the structure and internal links for the new `InfluxDB` documentation * Complete new InfluxDB v2 instructions * Update src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 InfluxDB.md Co-authored-by: Matt Dodson <[email protected]> * Update src/data/markdown/translated-guides/en/04 Results output/300 Grafana dashboards.md Co-authored-by: Matt Dodson <[email protected]> * Update src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 InfluxDB.md Co-authored-by: Matt Dodson <[email protected]> * Update src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 InfluxDB.md Co-authored-by: Matt Dodson <[email protected]> * Change old redirects --------- Co-authored-by: Pepe Cano <[email protected]>
1 parent 99f11cc commit f1075dd

File tree

16 files changed

+135
-327
lines changed

16 files changed

+135
-327
lines changed

gatsby-node.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,7 @@ const createRedirects = ({ actions }) => {
13951395

13961396
createRedirect({
13971397
fromPath: '/results-visualization/influxdb-+-grafana/',
1398-
toPath: '/results-output/real-time/influxdb-grafana/',
1398+
toPath: '/results-output/grafana-dashboards/',
13991399
isPermanent: true,
14001400
});
14011401

@@ -1547,12 +1547,6 @@ const createRedirects = ({ actions }) => {
15471547
isPermanent: true,
15481548
});
15491549

1550-
createRedirect({
1551-
fromPath: '/es/visualizacion-de-resultados/influxdb-+-grafana/',
1552-
toPath: '/es/visualizacion-de-resultados/influxdb-grafana/',
1553-
isPermanent: true,
1554-
});
1555-
15561550
createRedirect({
15571551
fromPath: '/using-k6/scenarios/arrival-rate',
15581552
toPath: '/using-k6/scenarios/concepts/open-vs-closed',
@@ -1597,6 +1591,18 @@ const createRedirects = ({ actions }) => {
15971591
isPermanent: true,
15981592
});
15991593

1594+
createRedirect({
1595+
fromPath: '/es/visualizacion-de-resultados/influxdb-+-grafana/',
1596+
toPath: '/results-output/grafana-dashboards/',
1597+
isPermanent: true,
1598+
});
1599+
1600+
createRedirect({
1601+
fromPath: '/results-output/real-time/influxdb-grafana',
1602+
toPath: '/results-output/grafana-dashboards/',
1603+
isPermanent: true,
1604+
});
1605+
16001606
const redirects = {
16011607
'/javascript-api/k6-http/cookiejar-k6-http':
16021608
'/javascript-api/k6-http/cookiejar/',
@@ -1646,7 +1652,7 @@ const createRedirects = ({ actions }) => {
16461652
'/getting-started/results-output/datadog':
16471653
'/results-visualization/datadog/',
16481654
'/getting-started/results-output/influxdb':
1649-
'/results-output/real-time/influxdb-grafana/',
1655+
'/results-output/real-time/influxdb/',
16501656
'/getting-started/results-output/json': '/results-visualization/json/',
16511657
'/getting-started/results-output/statsd': '/results-visualization/statsd/',
16521658
'/javascript-api/k6-metrics/counter-k6-metrics/counter-add-value-tags':

src/components/pages/doc-integrations/doc-icons-row/doc-icons-row.view.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ export const DocIconsRow = ({ className, title, subtitle, iconsData }) => (
1818
{to ? (
1919
<Link className={styles.link} to={to}>
2020
<Icon className={styles.icon} />
21-
<p className={'link'}>{name}</p>
21+
<p
22+
className={'link'}
23+
dangerouslySetInnerHTML={{ __html: name }}
24+
/>
2225
</Link>
2326
) : (
2427
<a className={styles.link} href={link}>
2528
<Icon className={styles.icon} />
26-
<p className={'link'}>{name}</p>
29+
<p
30+
className={'link'}
31+
dangerouslySetInnerHTML={{ __html: name }}
32+
/>
2733
</a>
2834
)}
2935
</li>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
title: 'InfluxDB + Grafana'
3-
redirect: 'https://k6.io/docs/results-output/real-time/influxdb-grafana'
2+
title: 'InfluxDB'
3+
redirect: 'https://k6.io/docs/results-output/real-time/influxdb'
44
---

src/data/markdown/translated-guides/en/01 Get started/04 Results Output.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ The available built-in outputs include:
8888
- [Dynatrace](/results-output/real-time/dynatrace)
8989
- [Elasticsearch](/results-output/real-time/elasticsearch)
9090
- [Grafana Cloud Prometheus](/results-output/real-time/grafana-cloud-prometheus)
91-
- [InfluxDB](/results-output/real-time/influxdb-grafana)
91+
- [InfluxDB](/results-output/real-time/influxdb)
9292
- [JSON](/results-output/real-time/json)
9393
- [Netdata](/results-output/real-time/netdata)
9494
- [New Relic](/results-output/real-time/new-relic)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You can also stream real-time metrics to the following services:
3434
- [Dynatrace](/results-output/real-time/dynatrace)
3535
- [Elasticsearch](/results-output/real-time/elasticsearch)
3636
- [Grafana Cloud Prometheus](/results-output/real-time/grafana-cloud-prometheus)
37-
- [InfluxDB](/results-output/real-time/influxdb-grafana)
37+
- [InfluxDB](/results-output/real-time/influxdb)
3838
- [Netdata](/results-output/real-time/netdata)
3939
- [New Relic](/results-output/real-time/new-relic)
4040
- [Prometheus remote write](/results-output/real-time/prometheus-remote-write)

src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 InfluxDB - Grafana.md

Lines changed: 0 additions & 143 deletions
This file was deleted.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: 'InfluxDB'
3+
excerpt: 'k6 has an output extension to store k6 metrics in InfluxDB v2. This document shows you how to configure this integration.'
4+
---
5+
6+
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/).
7+
8+
## Build the k6 version
9+
10+
<InstallationInstructions extensionUrl="github.com/grafana/xk6-output-influxdb"/>
11+
12+
## Run the test
13+
14+
Check that the InfluxDB instance to store the k6 metrics is running.
15+
16+
Use the previous k6 binary and run the test passing the following [options](#options):
17+
18+
```bash
19+
K6_INFLUXDB_ORGANIZATION="<INFLUXDB-ORGANIZATION-ID>" \
20+
K6_INFLUXDB_BUCKET="<INFLUXDB-BUCKET>" \
21+
K6_INFLUXDB_TOKEN="<INFLUXDB-TOKEN>" \
22+
K6_INFLUXDB_ADDR="<INFLUXDB-HTTP-ADDRESS>" \
23+
./k6 run script.js -o xk6-influxdb
24+
```
25+
26+
27+
k6 runs the test script and sends the [k6 metrics](/using-k6/metrics/) in real-time to the InfluxDB instance. You can now select the bucket to [query](https://docs.influxdata.com/influxdb/v2.7/query-data/) and [visualize](https://docs.influxdata.com/influxdb/v2.7/visualize-data/) the stored k6 metrics, for example, using the [InfluxDB Data Explorer](https://docs.influxdata.com/influxdb/v2.7/query-data/execute-queries/data-explorer/).
28+
29+
<br/>
30+
31+
![InfluxDB Data Explorer / k6 bucket](./images/InfluxDB/influxdb-data-explorer-k6-bucket.png)
32+
33+
34+
## Options
35+
36+
Here is the full list of options that can be configured and passed to the extension:
37+
38+
<!-- vale off -->
39+
| ENV | Default | Description |
40+
|-----|---------|-------------|
41+
| K6_INFLUXDB_ORGANIZATION | | Your InfluxDB organization ID. [View organizations](https://docs.influxdata.com/influxdb/v2.7/organizations/). |
42+
| K6_INFLUXDB_BUCKET | | The bucket to store k6 metrics data. [Manage buckets](https://docs.influxdata.com/influxdb/v2.7/organizations/buckets/). |
43+
| K6_INFLUXDB_TOKEN | | An API token that provides authorized access to store data. [Manage API tokens](https://docs.influxdata.com/influxdb/v2.7/security/tokens/). |
44+
| K6_INFLUXDB_ADDR | http://localhost:8086 | The address of the InfluxDB instance. |
45+
| K6_INFLUXDB_PUSH_INTERVAL | 1s | The flush's frequency of the `k6` metrics. |
46+
| K6_INFLUXDB_CONCURRENT_WRITES | 4 | Number of concurrent requests for flushing data. It is useful when a request takes more than the expected time (more than flush interval). |
47+
| K6_INFLUXDB_TAGS_AS_FIELDS | vu:int,iter:int,url | A comma-separated string to set `k6` metrics as non-indexable fields (instead of tags). An optional type can be specified using :type as in vu:int will make the field integer. The possible field types are int, bool, float and string, which is the default. Example: vu:int,iter:int,url:string,event_time:int. |
48+
| K6_INFLUXDB_INSECURE | false | When `true`, it will skip `https` certificate verification. |
49+
| K6_INFLUXDB_PRECISION | 1ns | The timestamp [Precision](https://docs.influxdata.com/influxdb/v2.7/reference/glossary/#precision). |
50+
<!-- vale on -->
51+
52+
## Grafana Dashboards
53+
54+
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/).
55+
56+
You can also build a [custom Grafana dashboard](/results-output/grafana-dashboards/) to visualize the testing results in your own way.
57+
58+
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.
136 KB
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Grafana dashboards
3+
excerpt: With multiple k6 output formats, you also have multiple ways to visualize test results in a Grafana dashboard.
4+
---
5+
6+
You have multiple ways to query k6 results in Grafana.
7+
Having test results in a dashboard brings various benefits:
8+
- Visualize your results to analyze performance during the test run or over multiple test runs.
9+
- Correlate test results with application and system metrics in the same dashboard to get a holistic overview of your system's performance and quickly find the root causes of performance issues.
10+
11+
![A grafana dashboard correlating k6 results with observability data](./images/correlated-grafana-dashboard-grafana-cloud-k6.png)
12+
13+
## Options
14+
15+
With [Grafana](https://grafana.com/grafana/), you can create a custom dashboard to query and **visualize data from multiple sources and any type of backend**. With k6, you can stream your test results to any backend using a [custom output extension](/extensions/get-started/create/output-extensions/) or an existing [real-time output](/results-output/real-time/#service).
16+
17+
The flexibility and interoperability of Grafana and k6 let you join test and observability data in one dashboard, independently of where the data is stored.
18+
19+
For inspiration about how to build a custom dashboard that visualizes k6 results, browse the list of [community-built k6 dashboards](https://grafana.com/grafana/dashboards/?search=k6). The following outputs include pre-built Grafana dashboards for their storage:
20+
21+
- [AWSTimestream](https://github.com/leonyork/xk6-output-timestream)
22+
- [InfluxDB](/results-output/real-time/influxdb)
23+
- [Prometheus remote write](/results-output/real-time/prometheus-remote-write)
24+
- [TimescaleDB](/results-output/real-time/timescaledb/)
25+
26+
For a managed solution, [Grafana Cloud k6](https://grafana.com/products/cloud/k6/) is our commercial offer bringing test storage, pre-built dashboards, enhanced collaboration features, and many more additional capabilities.
329 KB
Loading

0 commit comments

Comments
 (0)