Skip to content

Commit a049175

Browse files
authored
fix: Restore sample configurations broken during initial migration (#11276)
1 parent 48fa199 commit a049175

17 files changed

Lines changed: 299 additions & 105 deletions

File tree

plugins/aggregators/derivative/README.md

Lines changed: 57 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,61 @@
33
The Derivative Aggregator Plugin estimates the derivative for all fields of the
44
aggregated metrics.
55

6+
## Configuration
7+
8+
```toml @sample.conf
9+
# Calculates a derivative for every field.
10+
[[aggregators.derivative]]
11+
## The period in which to flush the aggregator.
12+
period = "30s"
13+
##
14+
## Suffix to append for the resulting derivative field.
15+
# suffix = "_rate"
16+
##
17+
## Field to use for the quotient when computing the derivative.
18+
## When using a field as the derivation parameter the name of that field will
19+
## be used for the resulting derivative, e.g. *fieldname_by_parameter*.
20+
## By default the timestamps of the metrics are used and the suffix is omitted.
21+
# variable = ""
22+
##
23+
## Maximum number of roll-overs in case only one measurement is found during a period.
24+
# max_roll_over = 10
25+
```
26+
27+
This aggregator will estimate a derivative for each field of a metric, which is
28+
contained in both the first and last metric of the aggregation interval.
29+
Without further configuration the derivative will be calculated with respect to
30+
the time difference between these two measurements in seconds.
31+
The following formula is applied is for every field
32+
33+
```text
34+
derivative = (value_last - value_first) / (time_last - time_first)
35+
```
36+
37+
The resulting derivative will be named `<fieldname>_rate` if no `suffix` is
38+
configured.
39+
40+
To calculate a derivative for every field use
41+
42+
```toml
43+
[[aggregators.derivative]]
44+
## Specific Derivative Aggregator Arguments:
45+
46+
## Configure a custom derivation variable. Timestamp is used if none is given.
47+
# variable = ""
48+
49+
## Suffix to add to the field name for the derivative name.
50+
# suffix = "_rate"
51+
52+
## Roll-Over last measurement to first measurement of next period
53+
# max_roll_over = 10
54+
55+
## General Aggregator Arguments:
56+
57+
## calculate derivative every 30 seconds
58+
period = "30s"
59+
```
60+
661
## Time Derivatives
762

863
In its default configuration it determines the first and last measurement of
@@ -11,9 +66,7 @@ calculated. This time difference is than used to divide the difference of each
1166
field using the following formula:
1267

1368
```text
14-
field_last - field_first
15-
derivative = --------------------------
16-
time_difference
69+
derivative = (value_last - value_first) / (time_last - time_first)
1770
```
1871

1972
For each field the derivative is emitted with a naming pattern
@@ -26,9 +79,7 @@ variable in the denominator. This variable is assumed to be a monotonically
2679
increasing value. In this feature the following formula is used:
2780

2881
```text
29-
field_last - field_first
30-
derivative = --------------------------------
31-
variable_last - variable_first
82+
derivative = (value_last - value_first) / (variable_last - variable_first)
3283
```
3384

3485
**Make sure the specified variable is not filtered and exists in the metrics
@@ -150,28 +201,6 @@ greater 0 may be important, if you need to detect changes between periods,
150201
e.g. when you have very few measurements in a period or quasi-constant metrics
151202
with only occasional changes.
152203

153-
## Configuration
154-
155-
```toml @sample.conf
156-
# Calculates a derivative for every field.
157-
[[aggregators.derivative]]
158-
## Specific Derivative Aggregator Arguments:
159-
160-
## Configure a custom derivation variable. Timestamp is used if none is given.
161-
# variable = ""
162-
163-
## Suffix to add to the field name for the derivative name.
164-
# suffix = "_rate"
165-
166-
## Roll-Over last measurement to first measurement of next period
167-
# max_roll_over = 10
168-
169-
## General Aggregator Arguments:
170-
171-
## calculate derivative every 30 seconds
172-
period = "30s"
173-
```
174-
175204
### Tags
176205

177206
No tags are applied by this aggregator.
Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
# Calculates a derivative for every field.
22
[[aggregators.derivative]]
3-
## Specific Derivative Aggregator Arguments:
4-
5-
## Configure a custom derivation variable. Timestamp is used if none is given.
6-
# variable = ""
7-
8-
## Suffix to add to the field name for the derivative name.
3+
## The period in which to flush the aggregator.
4+
period = "30s"
5+
##
6+
## Suffix to append for the resulting derivative field.
97
# suffix = "_rate"
10-
11-
## Roll-Over last measurement to first measurement of next period
8+
##
9+
## Field to use for the quotient when computing the derivative.
10+
## When using a field as the derivation parameter the name of that field will
11+
## be used for the resulting derivative, e.g. *fieldname_by_parameter*.
12+
## By default the timestamps of the metrics are used and the suffix is omitted.
13+
# variable = ""
14+
##
15+
## Maximum number of roll-overs in case only one measurement is found during a period.
1216
# max_roll_over = 10
13-
14-
## General Aggregator Arguments:
15-
16-
## calculate derivative every 30 seconds
17-
period = "30s"

plugins/inputs/cassandra/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ querying table metrics with a wildcard for the keyspace or table name.
3232
```toml @sample.conf
3333
# Read Cassandra metrics through Jolokia
3434
[[inputs.cassandra]]
35-
## DEPRECATED: The cassandra plugin has been deprecated. Please use the
36-
## jolokia2 plugin instead.
37-
##
38-
## see https://github.com/influxdata/telegraf/tree/master/plugins/inputs/jolokia2
39-
4035
context = "/jolokia/read"
4136
## List of cassandra servers exposing jolokia read service
4237
servers = ["myuser:mypassword@10.10.10.1:8778","10.10.10.2:8778",":8778"]

plugins/inputs/cassandra/sample.conf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Read Cassandra metrics through Jolokia
22
[[inputs.cassandra]]
3-
## DEPRECATED: The cassandra plugin has been deprecated. Please use the
4-
## jolokia2 plugin instead.
5-
##
6-
## see https://github.com/influxdata/telegraf/tree/master/plugins/inputs/jolokia2
7-
83
context = "/jolokia/read"
94
## List of cassandra servers exposing jolokia read service
105
servers = ["myuser:mypassword@10.10.10.1:8778","10.10.10.2:8778",":8778"]

plugins/inputs/kafka_consumer_legacy/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ instances of telegraf can read from the same topic in parallel.
1212
## Configuration
1313

1414
```toml @sample.conf
15-
## DEPRECATED: The 'kafka_consumer_legacy' plugin is deprecated in version 1.4.0, use 'inputs.kafka_consumer' instead, NOTE: 'kafka_consumer' only supports Kafka v0.8+.
1615
# Read metrics from Kafka topic(s)
1716
[[inputs.kafka_consumer_legacy]]
1817
## topic(s) to consume

plugins/inputs/kafka_consumer_legacy/sample.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
## DEPRECATED: The 'kafka_consumer_legacy' plugin is deprecated in version 1.4.0, use 'inputs.kafka_consumer' instead, NOTE: 'kafka_consumer' only supports Kafka v0.8+.
21
# Read metrics from Kafka topic(s)
32
[[inputs.kafka_consumer_legacy]]
43
## topic(s) to consume

plugins/inputs/logparser/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Migration Example:
4949
## Configuration
5050

5151
```toml @sample.conf
52-
## DEPRECATED: The 'logparser' plugin is deprecated in version 1.15.0, use 'inputs.tail' with 'grok' data format instead.
5352
# Read metrics off Arista LANZ, via socket
5453
[[inputs.logparser]]
5554
## Log files to parse.

plugins/inputs/logparser/sample.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
## DEPRECATED: The 'logparser' plugin is deprecated in version 1.15.0, use 'inputs.tail' with 'grok' data format instead.
21
# Read metrics off Arista LANZ, via socket
32
[[inputs.logparser]]
43
## Log files to parse.

plugins/inputs/riemann_listener/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ client that use riemann clients using riemann-protobuff format.
77

88
```toml @sample.conf
99
# Riemann protobuff listener
10-
[[inputs.rimann_listener]]
10+
[[inputs.riemann_listener]]
1111
## URL to listen on
1212
## Default is "tcp://:5555"
1313
# service_address = "tcp://:8094"

plugins/inputs/riemann_listener/sample.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Riemann protobuff listener
2-
[[inputs.rimann_listener]]
2+
[[inputs.riemann_listener]]
33
## URL to listen on
44
## Default is "tcp://:5555"
55
# service_address = "tcp://:8094"

0 commit comments

Comments
 (0)