@cryptotaxi247 / netdata-1 / commits / 2cee1476f

K6 quality of life updates (#10985)

* add k6 docs; improve conf file * Update collectors/statsd.plugin/k6.md Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud> * Update collectors/statsd.plugin/k6.md Co-authored-by: Joel Hans <joel.g.hans@gmail.com> * Update collectors/statsd.plugin/k6.md Co-authored-by: Joel Hans <joel.g.hans@gmail.com> * Update collectors/statsd.plugin/k6.md Co-authored-by: Joel Hans <joel.g.hans@gmail.com> * Update collectors/statsd.plugin/k6.md Co-authored-by: Joel Hans <joel.g.hans@gmail.com> * Update collectors/statsd.plugin/k6.md Co-authored-by: Joel Hans <joel.g.hans@gmail.com> * change list to headings * add k6 to statsd readme * fix avg type * Update collectors/statsd.plugin/README.md Co-authored-by: Joel Hans <joel.g.hans@gmail.com> * Update collectors/statsd.plugin/README.md Co-authored-by: Joel Hans <joel.g.hans@gmail.com> * Update collectors/statsd.plugin/README.md Co-authored-by: Joel Hans <joel.g.hans@gmail.com> * Update collectors/statsd.plugin/README.md Co-authored-by: Joel Hans <joel.g.hans@gmail.com> * Update collectors/statsd.plugin/k6.md Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud> Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud> Co-authored-by: Joel Hans <joel.g.hans@gmail.com>

Odysseas Lamtzidis committed Apr 27, 2021 at 15:05 UTC 2cee1476f21d2472c4339e4a6e180b20856e469d
3 files changed +105 -16
collectors/statsd.plugin/README.md
+11
@@ -19,6 +19,17 @@ Since statsd is embedded in Netdata, it means you now have a statsd server embed
19
20 Netdata statsd is fast. It can collect more than **1.200.000 metrics per second** on modern hardware, more than **200Mbps of sustained statsd traffic**, using 1 CPU core. The implementation uses two threads: one thread collects metrics, another one updates the charts from the collected data.
21
22 +# Available StatsD collectors
23 +
24 +Netdata ships with collectors implemented using the StatsD collector. They are configuration files (as you will read bellow), but they function as a collector, in the sense that configuration file organize the metrics of a data source into pre-defined charts.
25 +
26 +On these charts, we can have alarms as with any metric and chart.
27 +
28 +- [K6 load testing tool](https://k6.io)
29 + - **Description:** k6 is a developer-centric, free and open-source load testing tool built for making performance testing a productive and enjoyable experience.
30 + - [Documentation](/collectors/statsd.plugin/k6.md)
31 + - [Configuration](https://github.com/netdata/netdata/blob/master/collectors/statsd.plugin/k6.conf)
32 +
33 ## Metrics supported by Netdata
34
35 Netdata fully supports the StatsD protocol. All StatsD client libraries can be used with Netdata too.
collectors/statsd.plugin/k6.conf
+22 -16
@@ -6,6 +6,7 @@
6
7 [dictionary]
8 http_reqs = HTTP Requests
9 + http_reqs_failed = Failed HTTP Requests
10 vus = Virtual active users
11 vus_max = max Virtual active users
12 iteration_duration = iteration duration
@@ -19,7 +20,7 @@
20 http_req_receiving = Receiving HTTP requests
21 http_req_waiting = Waiting HTTP requests
22 http_req_duration_median = Median HTTP req duration
22 - http_req_duration_average = AVG HTTP req duration
23 + http_req_duration_average = Avg HTTP req duration
24 http_req_duration = HTTP req duration
25 http_req_duration_max = max HTTP req duration
26 http_req_duration_min = min HTTP req duration
@@ -30,13 +31,22 @@
31
32 [http_reqs]
33 name = http_reqs
33 - title = HTTP Requests
34 + title = HTTP Requests rate
35 family = http requests
36 context = k6.http_requests
37 dimension = k6.http_reqs http_reqs last 1 1 sum
38 type = line
39 units = requests/s
40
41 +[http_reqs]
42 + name = http_reqs_failed
43 + title = Failed HTTP Requests rate
44 + family = http requests
45 + context = k6.http_requests
46 + dimension = k6.http_reqs_failed http_reqs_failed last 1 1 sum
47 + type = line
48 + units = requests/s
49 +
50 [vus]
51 name = vus
52 title = Virtual Active Users
@@ -53,7 +63,7 @@
63 dimension = k6.iteration_duration iteration_duration last 1 1
64 dimension = k6.iteration_duration iteration_duration_max max 1 1
65 dimension = k6.iteration_duration iteration_duration_min min 1 1
56 - dimension = k6.iteration_duration iteration_duration_avg avg 1 1
66 + dimension = k6.iteration_duration iteration_duration_avg average 1 1
67 type = line
68 units = s
69
@@ -74,31 +84,27 @@
84 units = kb/s
85 type = area
86
77 -[http_req_status]
78 - name = http_req_status
79 - title = Time spent on HTTP
80 - family = http requests
81 - dimension = k6.http_req_blocked http_req_blocked last 1 1
82 - dimension = k6.http_req_connecting http_req_connecting last 1 1
83 - units = ms
84 - type = line
85 -
87 [http_req_duration_types]
88 name = http_req_duration_types
88 - title = Time spent on HTTP connection states
89 + title = HTTP Requests total duration
90 family = http requests
91 dimension = k6.http_req_sending http_req_sending last 1 1
92 dimension = k6.http_req_waiting http_req_waiting last 1 1
93 dimension = k6.http_req_receiving http_req_receiving last 1 1
94 + dimension = k6.http_req_blocked http_req_blocked last 1 1
95 + dimension = k6.http_req_connecting http_req_connecting last 1 1
96 units = ms
97 type = stacked
98
99 [http_req_duration]
100 name = http_req_duration
98 - title = Total time for HTTP request
101 + title = HTTP duration metrics
102 family = http requests
103 dimension = k6.http_req_duration http_req_duration_median median 1 1
104 dimension = k6.http_req_duration http_req_duration_max max 1 1
102 - dimension = k6.http_req_duration http_req_duration_average avg 1 1
105 + dimension = k6.http_req_duration http_req_duration_average average 1 1
106 dimension = k6.http_req_duration http_req_duration_min min 1 1
104 - dimension = k6.http_req_duration httP_req_duration_p95 percentile 1 1
107 + dimension = k6.http_req_duration http_req_duration_p95 percentile 1 1
108 + dimension = k6.http_req_duration http_req_duration last 1 1
109 + units = ms
110 + type = line
collectors/statsd.plugin/k6.md new
+72
@@ -0,0 +1,72 @@
1 +<!--
2 +title: "K6 load test monitoring with Netdata"
3 +custom_edit_url: https://github.com/netdata/netdata/edit/master/collectors/stats.d.plugin/k6.md
4 +sidebar_label: "K6 Load Testing"
5 +-->
6 +
7 +# K6 Load Testing monitoring with Netdata
8 +
9 +Monitors the impact of load testing experiments performed with [K6](https://k6.io/).
10 +
11 +You can read more about the metrics that K6 sends in the [K6 documentation](https://k6.io/docs/using-k6/metrics/).
12 +
13 +## Requirements
14 +
15 +- When running the k6 experiment, specify a [StatsD output](https://k6.io/docs/results-visualization/statsd/).
16 + - Tip: K6 currently supports tags only with [datadog output](https://k6.io/docs/results-visualization/datadog/), which is in essence StatsD. Netdata can be used with both.
17 +
18 +## Metrics
19 +
20 +### HTTP Requests
21 +
22 +Number of HTTP requests that K6 generates, per second.
23 +
24 +### Failed HTTP Requests
25 +
26 +Number of failed HTTP requests that K6 generates, per second.
27 +
28 +### Virtual Active Users
29 +Current number of active virtual users.
30 +
31 +### Iteration Duration
32 +
33 +The time it took K6 to complete one full iteration of the main function.
34 +
35 +### Dropped Iterations
36 +
37 +The number of iterations that could not be started either due to lack of Virtual Users or lack of time.
38 +
39 +### Data
40 +
41 +The amount of data received and sent.
42 +
43 +### TTP Requests total duration
44 +
45 +The total duration it took for a round-trip of an HTTP request. It includes:
46 +- Blocked HTTP requests: time spent blocked before initiating the request
47 +- Connecting HTTP requests: time spent establishing TCP connection to the remote host
48 +- Sending HTTP requests: time spent sending data to the remote host
49 +- Receiving HTTP requests: time spent receiving data from the remote host
50 +- Waiting HTTP requests: time spent waiting for response from the remote host
51 +
52 +### HTTP duration metrics
53 +
54 +Different metrics on the HTTP request as defined by K6. The HTTP request duration is defined by K6 as: `HTTP sending request` + `HTTP receiving request` + `HTTP waiting request`.
55 +
56 +Metrics:
57 +- Median
58 +- Average
59 +- Max
60 +- Min
61 +- 95th percentile
62 +- absolute (the value as it is, without any computation)
63 +
64 +## Configuration
65 +
66 +The collector is preconfigured and defined in `statsd.plugin/k6.conf`.
67 +
68 +Due to being a StatsD collector, you only need to define the configuration file and then send data to Netdata using the StatsD protocol.
69 +
70 +If Netdata is running on the same machine as K6, no further configuration is required. Otherwise, you will have to [point K6](https://k6.io/docs/results-visualization/statsd/) to your node and make sure that the K6 process can reach Netdata.
71 +
72 +The default namespace that is used in the configuration is `k6`. If you change it in K6, you will have to change it as well in the configuration file `k6.conf`.