master
md 50 lines 1.89 KB
Rendered Raw
1 # Trimmed Mean
2
3 The trimmed mean is the average value of a series excluding the smallest and biggest points.
4
5 Netdata applies linear interpolation on the last point, if the percentage requested to be excluded does not give a
6 round number of points.
7
8 The following percentile aliases are defined:
9
10 - `trimmed-mean1`
11 - `trimmed-mean2`
12 - `trimmed-mean3`
13 - `trimmed-mean5`
14 - `trimmed-mean10`
15 - `trimmed-mean15`
16 - `trimmed-mean20`
17 - `trimmed-mean25`
18
19 The default `trimmed-mean` is an alias for `trimmed-mean5`.
20 Any percentage may be requested using the `group_options` query parameter.
21
22 ## how to use
23
24 Use it in alerts like this:
25
26 ```
27 alarm: my_alert
28 on: my_chart
29 lookup: trimmed-mean5 -1m unaligned of my_dimension
30 warn: $this > 1000
31 ```
32
33 `trimmed-mean` does not change the units. For example, if the chart units is `requests/sec`, the result
34 will be again expressed in the same units.
35
36 It can also be used in APIs and badges as `&group=trimmed-mean` in the URL and the additional parameter `group_options`
37 may be used to request any percentage (e.g. `&group=trimmed-mean&group_options=29`).
38
39 ## Examples
40
41 Examining last 1 minute `successful` web server responses:
42
43 - ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.response_statuses&options=unaligned&dimensions=success&group=min&after=-60&label=min)
44 - ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.response_statuses&options=unaligned&dimensions=success&group=average&after=-60&label=average)
45 - ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.response_statuses&options=unaligned&dimensions=success&group=trimmed-mean5&after=-60&label=trimmed-mean5&value_color=orange)
46 - ![](https://registry.my-netdata.io/api/v1/badge.svg?chart=web_log_nginx.response_statuses&options=unaligned&dimensions=success&group=max&after=-60&label=max)
47
48 ## References
49
50 - <https://en.wikipedia.org/wiki/Truncated_mean>.