From 292d300aef993ad21b2b585746d7d2ab983e6e78 Mon Sep 17 00:00:00 2001 From: Heitor Tashiro Sergent Date: Tue, 3 Oct 2023 14:27:09 -0500 Subject: [PATCH 1/6] Add deprecation warning for statsd output --- .../en/04 Results output/200 Real-time/00 StatsD.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 StatsD.md b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 StatsD.md index 37a6573687..9353c2563a 100755 --- a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 StatsD.md +++ b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 StatsD.md @@ -3,6 +3,14 @@ title: 'StatsD' excerpt: 'k6 has a built-in output to a StatsD service.' --- +
+ +The built-in StatsD output has been deprecated on k6 v0.47.0. If you'd like to keep using this feature, you can use the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd). + +For more information on the reason behind this change, you can follow [this issue](https://github.com/grafana/k6/issues/2982) in the k6 repository. + +
+ k6 can also push the metrics to a [StatsD](https://github.com/statsd/statsd) service like: From 364cd28447d021d6cbbcd57ab7962995c548a088 Mon Sep 17 00:00:00 2001 From: Heitor Tashiro Sergent Date: Wed, 4 Oct 2023 13:54:34 -0500 Subject: [PATCH 2/6] Update en guides for using statsd extension --- .../200 Real-time/00 Amazon CloudWatch.md | 24 +++++++++++++++---- .../200 Real-time/00 DataDog.md | 20 ++++++++++++---- .../200 Real-time/00 Netdata.md | 23 ++++++++++++++---- .../200 Real-time/00 NewRelic.md | 18 +++++++++++--- .../200 Real-time/00 StatsD.md | 14 ++++++++--- 5 files changed, 80 insertions(+), 19 deletions(-) diff --git a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Amazon CloudWatch.md b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Amazon CloudWatch.md index bbaa332c82..427bdebc2b 100644 --- a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Amazon CloudWatch.md +++ b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Amazon CloudWatch.md @@ -3,14 +3,26 @@ title: 'Amazon CloudWatch' excerpt: 'You can send k6 results output to Amazon CloudWatch and later visualize them.' --- -k6 can send metrics data to [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/) through the [CloudWatch Agent](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html), which is effectively a StatsD integration. These metrics can then be visualized in dashboards. +
-This guide covers running the CloudWatch integration and visualizing the results: +The built-in StatsD output has been deprecated on k6 v0.47.0. You can continue to use this feature by using the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd), and this guide has been updated to include instructions for how to use it. + +For more information on the reason behind this change, you can follow [this issue](https://github.com/grafana/k6/issues/2982) in the k6 repository. + +
+ +k6 can send metrics data to [Amazon CloudWatch](https://aws.amazon.com/cloudwatch/) through the [CloudWatch Agent](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html) by using the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd). These metrics can then be visualized in dashboards. + +This guide covers how to: - Run the CloudWatch agent - Run the k6 test - Visualize k6 metrics in Amazon CloudWatch +## Before you begin + +To use the StatsD output option, you have to build a k6 binary using the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd). For more details, refer to [StatsD](/results-output/real-time/statsd). + ## Run the CloudWatch agent We presume that you already have a machine that supports both running k6 and CloudWatch agent, which either runs a flavor of GNU/Linux or Windows. Just go ahead and [download](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/download-cloudwatch-agent-commandline.html) the suitable CloudWatch agent version for your operating system. @@ -60,18 +72,20 @@ We presume that you already have a machine that supports both running k6 and Clo ## Run the k6 test -Once the agent is running, [install](/get-started/installation) k6 and [run](/get-started/running-k6) the test, so that the metrics gets sent to the agent with the following command: +Once the agent is running, you can run your test with: ```bash -$ K6_STATSD_ENABLE_TAGS=true k6 run --out statsd script.js +$ K6_STATSD_ENABLE_TAGS=true k6 run --out output-statsd script.js ``` -Please look at [StatsD](/results-output/real-time/statsd) output page for configuration options. +Make sure you're using the k6 binary you built with the xk6-output-statsd extension. + +You can look at the [StatsD](/results-output/real-time/statsd) output page for configuration options. ## Visualize k6 metrics in Amazon CloudWatch diff --git a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 DataDog.md b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 DataDog.md index 0b9241aa90..7ae4acfd5e 100755 --- a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 DataDog.md +++ b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 DataDog.md @@ -3,16 +3,26 @@ title: 'Datadog' excerpt: 'Send k6 output to Datadog to visualize load test results and correlate performance testing metrics in Datadog.' --- -> ⚠️   For k6 Cloud tests, follow the [k6 Cloud instructions](/cloud/integrations/cloud-apm/datadog). +
+ +The built-in StatsD output has been deprecated on k6 v0.47.0. You can continue to use this feature by using the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd), and this guide has been updated to include instructions for how to use it. + +For more information on the reason behind this change, you can follow [this issue](https://github.com/grafana/k6/issues/2982) in the k6 repository. + +
k6 can send metrics to [Datadog](https://www.datadoghq.com/). That allows visualizing and correlating performance testing metrics with other monitored metrics in Datadog. -This article outlines the instructions of the Datadog integration: +This guide covers how to: - Run the Datadog Agent - Run the k6 test - Visualize in Datadog +## Before you begin + +To use the StatsD output option, you have to build a k6 binary using the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd). For more details, refer to [StatsD](/results-output/real-time/statsd). + ## Run the Datadog Agent To get k6 metrics into Datadog, k6 sends metrics through the Datadog Agent, which collects, aggregates, and forwards the metrics to the Datadog platform. @@ -58,12 +68,14 @@ Once the Datadog Agent service is running, run the k6 test and send the metrics ```bash -$ K6_STATSD_ENABLE_TAGS=true k6 run --out statsd script.js +$ K6_STATSD_ENABLE_TAGS=true k6 run --out output-statsd script.js ``` -Please look at the [StatsD](/results-output/real-time/statsd) output page for configuration options. +Make sure you're using the k6 binary you built with the xk6-output-statsd extension. + +You can look at the [StatsD](/results-output/real-time/statsd) output page for configuration options. ## Visualize in Datadog diff --git a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Netdata.md b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Netdata.md index 40227da969..783db1ebf5 100644 --- a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Netdata.md +++ b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Netdata.md @@ -3,10 +3,23 @@ title: 'Netdata' excerpt: 'You can send k6 output to Netdata. With this integration, visualize test results with zero configuration, in seconds' --- +
+ +The built-in StatsD output has been deprecated on k6 v0.47.0. You can continue to use this feature by using the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd), and this guide has been updated to include instructions for how to use it. + +For more information on the reason behind this change, you can follow [this issue](https://github.com/grafana/k6/issues/2982) in the k6 repository. + +
+ k6 can send performance testing metrics to [Netdata](https://netdata.cloud). This enables the user to start monitoring their k6 experiments right away, as Netdata is a monitoring tool with: -- auto-configuration and auto-detection of data sources -- automatic organization of metrics into **meaningful** charts and visualization -- per-second metric granularity + +- Auto-configuration and auto-detection of data sources +- Automatic organization of metrics into **meaningful** charts and visualization +- Per-second metric granularity + +## Before you begin + +To use the StatsD output option, you have to build a k6 binary using the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd). For more details, refer to [StatsD](/results-output/real-time/statsd). ## Run Netdata @@ -24,9 +37,11 @@ Netdata runs a fully functional [StatsD](https://learn.netdata.cloud/docs/agent/ ## Run the k6 test ```bash -k6 run --out statsd script.js +k6 run --out output-statsd script.js ``` +Make sure you're using the k6 binary you built with the xk6-output-statsd extension. + **Caveat**: By default, Netdata binds the StatsD server to `localhost`. That means that if Netdata and k6 are in different hosts, you will need to edit the configuration file of Netdata. 1. Visit [StatsD documentation](https://learn.netdata.cloud/docs/agent/collectors/statsd.plugin) for a reference on the configuration options. We are interested in `#bind to` option. 2. Use `sudo ./edit-config netdata.conf` from inside the directory where Netdata stores its configuration files (e.g `/etc/netdata/`) and add `bind to=udp:0.0.0.0:8125`. diff --git a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 NewRelic.md b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 NewRelic.md index 3b587382ff..5d005ec85f 100644 --- a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 NewRelic.md +++ b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 NewRelic.md @@ -3,7 +3,13 @@ title: 'New Relic' excerpt: 'You can send k6 output to New Relic. With this integration visualize load test results and correlate them your New Relic telemetry data, create and share reports, and alert on k6 telemetry.' --- -> ⚠️   For k6 Cloud tests, follow the [k6 Cloud instructions](/cloud/integrations/cloud-apm/new-relic). +
+ +The built-in StatsD output has been deprecated on k6 v0.47.0. You can continue to use this feature by using the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd), and this guide has been updated to include instructions for how to use it. + +For more information on the reason behind this change, you can follow [this issue](https://github.com/grafana/k6/issues/2982) in the k6 repository. + +
k6 can send telemetry data to [New Relic](https://newrelic.com/) through the New Relic [StatsD integration](https://docs.newrelic.com/docs/integrations/host-integrations/host-integrations-list/statsd-monitoring-integration-version-2). Within New Relic you can find your k6 performance data alongside your real users data and server side performance. This data can be visualized in dashboards and shared with others, used to compare load impact with system performance, and alert on metrics too. @@ -13,6 +19,10 @@ This guide covers running the New Relic integration: - Run the k6 test - Visualize k6 telemetry in New Relic +## Before you begin + +To use the StatsD output option, you have to build a k6 binary using the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd). For more details, refer to [StatsD](/results-output/real-time/statsd). + ## Run the New Relic StatsD integration To get k6 metrics into New Relic, k6 sends metrics to the New Relic StatsD integration which will take care of collecting, aggregate, format and send the telemetry to the New Relic Telemetry Data Platform. You can run this with or without a New Relic agent. @@ -66,12 +76,14 @@ Once the integration is running, run the k6 test and send the metrics to the int ```bash -$ K6_STATSD_ENABLE_TAGS=true k6 run --out statsd script.js +$ K6_STATSD_ENABLE_TAGS=true k6 run --out output-statsd script.js ``` -Please look at the [StatsD](/results-output/real-time/statsd) output page for configuration options. +Make sure you're using the k6 binary you built with the xk6-output-statsd extension. + +You can look at the [StatsD](/results-output/real-time/statsd) output page for configuration options. ## Visualisation in New Relic diff --git a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 StatsD.md b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 StatsD.md index 9353c2563a..39da216ec7 100755 --- a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 StatsD.md +++ b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 StatsD.md @@ -5,18 +5,26 @@ excerpt: 'k6 has a built-in output to a StatsD service.'
-The built-in StatsD output has been deprecated on k6 v0.47.0. If you'd like to keep using this feature, you can use the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd). +The built-in StatsD output has been deprecated on k6 v0.47.0. You can continue to use this feature by using the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd), and this guide has been updated to include instructions for how to use it. For more information on the reason behind this change, you can follow [this issue](https://github.com/grafana/k6/issues/2982) in the k6 repository.
-k6 can also push the metrics to a [StatsD](https://github.com/statsd/statsd) service like: +k6 can push test metrics to a [StatsD](https://github.com/statsd/statsd) service by using the [xk6-output-statsd extension](https://github.com/LeonAdato/xk6-output-statsd). + +## Build the k6 version + + + +## Run the k6 test + +Using the k6 binary you built in the previous step, you can use the `--out output-statsd` option when running your tests to use this extension: ```bash -$ k6 run --out statsd script.js +$ ./k6 run --out output-statsd script.js ``` From ce5141f455d29be6819a1a52d84f2909286f92d7 Mon Sep 17 00:00:00 2001 From: Heitor Tashiro Sergent Date: Wed, 4 Oct 2023 13:54:39 -0500 Subject: [PATCH 3/6] Update installation-instructions.view.js --- .../installation-instructions/installation-instructions.view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/shared/installation-instructions/installation-instructions.view.js b/src/components/shared/installation-instructions/installation-instructions.view.js index 381d9efbce..9abe952960 100644 --- a/src/components/shared/installation-instructions/installation-instructions.view.js +++ b/src/components/shared/installation-instructions/installation-instructions.view.js @@ -19,7 +19,7 @@ const InstallationInstructions = ({ extensionUrl }) => (

To learn more about how to build custom k6 versions, check out{' '} - xk6 + xk6.

From 3728d7d834eac4161d1c4f82f16c05a599205a14 Mon Sep 17 00:00:00 2001 From: Heitor Tashiro Sergent Date: Wed, 4 Oct 2023 13:54:53 -0500 Subject: [PATCH 4/6] Update statsd output command on es guides --- .../translated-guides/es/01 Get started/04 Results Output.md | 2 +- .../es/04 Results visualization/01 Amazon CloudWatch.md | 2 +- .../translated-guides/es/04 Results visualization/08 Netdata.md | 2 +- .../es/04 Results visualization/09 NewRelic.md | 2 +- .../translated-guides/es/04 Results visualization/10 StatsD.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/data/markdown/translated-guides/es/01 Get started/04 Results Output.md b/src/data/markdown/translated-guides/es/01 Get started/04 Results Output.md index bd467322f9..151e7ecfc3 100755 --- a/src/data/markdown/translated-guides/es/01 Get started/04 Results Output.md +++ b/src/data/markdown/translated-guides/es/01 Get started/04 Results Output.md @@ -103,7 +103,7 @@ k6 puede enviar datos de resultados más granulares a diferentes salidas para in ```bash -$ k6 run --out statsd script.js +$ k6 run --out output-statsd script.js ``` diff --git a/src/data/markdown/translated-guides/es/04 Results visualization/01 Amazon CloudWatch.md b/src/data/markdown/translated-guides/es/04 Results visualization/01 Amazon CloudWatch.md index c27ac08366..557e23664e 100644 --- a/src/data/markdown/translated-guides/es/04 Results visualization/01 Amazon CloudWatch.md +++ b/src/data/markdown/translated-guides/es/04 Results visualization/01 Amazon CloudWatch.md @@ -64,7 +64,7 @@ Suponemos que ya tiene una máquina que soporta tanto la ejecución de k6 como d Una vez que el agente esté funcionando correctamente, [instale](/es/empezando/instalacion/) k6 y [ejecute](/es/empezando/ejecucion-de-k6/) la prueba, para que las métricas sean enviadas al agente mediante el siguiente comando: ```bash -$ k6 run --out statsd script.js +$ k6 run --out output-statsd script.js ``` Las siguientes opciones pueden ser configuradas como variables de entorno, dependiendo de la configuración del agente: diff --git a/src/data/markdown/translated-guides/es/04 Results visualization/08 Netdata.md b/src/data/markdown/translated-guides/es/04 Results visualization/08 Netdata.md index cf661d3f30..10620c035a 100644 --- a/src/data/markdown/translated-guides/es/04 Results visualization/08 Netdata.md +++ b/src/data/markdown/translated-guides/es/04 Results visualization/08 Netdata.md @@ -24,7 +24,7 @@ Netdata runs a fully functional [StatsD](https://learn.netdata.cloud/docs/agent/ ## Run the k6 test ```bash -k6 run --out statsd script.js +k6 run --out output-statsd script.js ``` **Caveat**: By default, Netdata binds the StatsD server to `localhost`. That means that if Netdata and K6 are in different hosts, you will need to edit the configuration file of Netdata. diff --git a/src/data/markdown/translated-guides/es/04 Results visualization/09 NewRelic.md b/src/data/markdown/translated-guides/es/04 Results visualization/09 NewRelic.md index dbe8fbfdc7..17f306262b 100644 --- a/src/data/markdown/translated-guides/es/04 Results visualization/09 NewRelic.md +++ b/src/data/markdown/translated-guides/es/04 Results visualization/09 NewRelic.md @@ -52,7 +52,7 @@ Una vez que la integración esté lista, ejecute la prueba con k6 y envíe las m ```bash -$ k6 run --out statsd script.js +$ k6 run --out output-statsd script.js ``` diff --git a/src/data/markdown/translated-guides/es/04 Results visualization/10 StatsD.md b/src/data/markdown/translated-guides/es/04 Results visualization/10 StatsD.md index 5d596ed295..d1ac5120da 100755 --- a/src/data/markdown/translated-guides/es/04 Results visualization/10 StatsD.md +++ b/src/data/markdown/translated-guides/es/04 Results visualization/10 StatsD.md @@ -8,7 +8,7 @@ k6 también puede mostrar las métricas con un servicio [StatsD](https://github. ```bash -$ k6 run --out statsd script.js +$ k6 run --out output-statsd script.js ``` From e48075056315dcea501b326ab2bf0412a2b648b6 Mon Sep 17 00:00:00 2001 From: Heitor Tashiro Sergent Date: Wed, 11 Oct 2023 10:37:46 -0500 Subject: [PATCH 5/6] Update es results output code snippet --- .../translated-guides/es/01 Get started/04 Results Output.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/data/markdown/translated-guides/es/01 Get started/04 Results Output.md b/src/data/markdown/translated-guides/es/01 Get started/04 Results Output.md index 151e7ecfc3..daaeb6f444 100755 --- a/src/data/markdown/translated-guides/es/01 Get started/04 Results Output.md +++ b/src/data/markdown/translated-guides/es/01 Get started/04 Results Output.md @@ -103,7 +103,9 @@ k6 puede enviar datos de resultados más granulares a diferentes salidas para in ```bash -$ k6 run --out output-statsd script.js +$ k6 run \ +--out json=test.json \ +--out influxdb=http://localhost:8086/k6 ``` From 8e541cdfb953deb404eed4e53c57123095b82eb4 Mon Sep 17 00:00:00 2001 From: Heitor Tashiro Sergent Date: Wed, 11 Oct 2023 10:44:56 -0500 Subject: [PATCH 6/6] Update Netdata broken links --- .../en/04 Results output/200 Real-time/00 Netdata.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Netdata.md b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Netdata.md index 783db1ebf5..5ef802c002 100644 --- a/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Netdata.md +++ b/src/data/markdown/translated-guides/en/04 Results output/200 Real-time/00 Netdata.md @@ -32,7 +32,7 @@ Alternatively, you can read more about installing and running Netdata in their [ ## Setup Netdata for K6 -Netdata runs a fully functional [StatsD](https://learn.netdata.cloud/docs/agent/collectors/statsd.plugin) server by default and we have included a default configuration file for k6 metrics. +Netdata runs a fully functional [StatsD](https://github.com/netdata/netdata/blob/master/collectors/statsd.plugin/README.md) server by default and we have included a default configuration file for k6 metrics. ## Run the k6 test @@ -43,12 +43,13 @@ k6 run --out output-statsd script.js Make sure you're using the k6 binary you built with the xk6-output-statsd extension. **Caveat**: By default, Netdata binds the StatsD server to `localhost`. That means that if Netdata and k6 are in different hosts, you will need to edit the configuration file of Netdata. -1. Visit [StatsD documentation](https://learn.netdata.cloud/docs/agent/collectors/statsd.plugin) for a reference on the configuration options. We are interested in `#bind to` option. + +1. Visit the [StatsD documentation](https://github.com/netdata/netdata/blob/master/collectors/statsd.plugin/README.md) for a reference on the configuration options. We are interested in the `#bind to` option. 2. Use `sudo ./edit-config netdata.conf` from inside the directory where Netdata stores its configuration files (e.g `/etc/netdata/`) and add `bind to=udp:0.0.0.0:8125`. ## Visualize in Netdata -Netdata will automatically create charts for your application, as illustrated in the [documentation](https://learn.netdata.cloud/docs/agent/collectors/statsd.plugin/k6). +Netdata will automatically create charts for your application, as illustrated in the [documentation](https://github.com/netdata/netdata/blob/master/collectors/statsd.plugin/k6.md). Simply head over to `localhost:19999` (assuming that you are running Netdata on the same machine) and find the k6 section. If you had opened Netdata before running the experiment, you will need to refresh the dashboard page.