Skip to content

Commit

Permalink
fix: Restore sample configurations broken during initial migration (#…
Browse files Browse the repository at this point in the history
…11276)

(cherry picked from commit a049175)
  • Loading branch information
srebhan authored and Sven Rebhan committed Jul 5, 2022
1 parent b3c194e commit 96c74b5
Show file tree
Hide file tree
Showing 17 changed files with 299 additions and 105 deletions.
85 changes: 57 additions & 28 deletions plugins/aggregators/derivative/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,61 @@
The Derivative Aggregator Plugin estimates the derivative for all fields of the
aggregated metrics.

## Configuration

```toml @sample.conf
# Calculates a derivative for every field.
[[aggregators.derivative]]
## The period in which to flush the aggregator.
period = "30s"
##
## Suffix to append for the resulting derivative field.
# suffix = "_rate"
##
## Field to use for the quotient when computing the derivative.
## When using a field as the derivation parameter the name of that field will
## be used for the resulting derivative, e.g. *fieldname_by_parameter*.
## By default the timestamps of the metrics are used and the suffix is omitted.
# variable = ""
##
## Maximum number of roll-overs in case only one measurement is found during a period.
# max_roll_over = 10
```

This aggregator will estimate a derivative for each field of a metric, which is
contained in both the first and last metric of the aggregation interval.
Without further configuration the derivative will be calculated with respect to
the time difference between these two measurements in seconds.
The following formula is applied is for every field

```text
derivative = (value_last - value_first) / (time_last - time_first)
```

The resulting derivative will be named `<fieldname>_rate` if no `suffix` is
configured.

To calculate a derivative for every field use

```toml
[[aggregators.derivative]]
## Specific Derivative Aggregator Arguments:

## Configure a custom derivation variable. Timestamp is used if none is given.
# variable = ""

## Suffix to add to the field name for the derivative name.
# suffix = "_rate"

## Roll-Over last measurement to first measurement of next period
# max_roll_over = 10

## General Aggregator Arguments:

## calculate derivative every 30 seconds
period = "30s"
```

## Time Derivatives

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

```text
field_last - field_first
derivative = --------------------------
time_difference
derivative = (value_last - value_first) / (time_last - time_first)
```

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

```text
field_last - field_first
derivative = --------------------------------
variable_last - variable_first
derivative = (value_last - value_first) / (variable_last - variable_first)
```

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

## Configuration

```toml @sample.conf
# Calculates a derivative for every field.
[[aggregators.derivative]]
## Specific Derivative Aggregator Arguments:

## Configure a custom derivation variable. Timestamp is used if none is given.
# variable = ""

## Suffix to add to the field name for the derivative name.
# suffix = "_rate"

## Roll-Over last measurement to first measurement of next period
# max_roll_over = 10

## General Aggregator Arguments:

## calculate derivative every 30 seconds
period = "30s"
```

### Tags

No tags are applied by this aggregator.
Expand Down
25 changes: 12 additions & 13 deletions plugins/aggregators/derivative/sample.conf
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Calculates a derivative for every field.
[[aggregators.derivative]]
## Specific Derivative Aggregator Arguments:

## Configure a custom derivation variable. Timestamp is used if none is given.
# variable = ""

## Suffix to add to the field name for the derivative name.
## The period in which to flush the aggregator.
period = "30s"
##
## Suffix to append for the resulting derivative field.
# suffix = "_rate"

## Roll-Over last measurement to first measurement of next period
##
## Field to use for the quotient when computing the derivative.
## When using a field as the derivation parameter the name of that field will
## be used for the resulting derivative, e.g. *fieldname_by_parameter*.
## By default the timestamps of the metrics are used and the suffix is omitted.
# variable = ""
##
## Maximum number of roll-overs in case only one measurement is found during a period.
# max_roll_over = 10

## General Aggregator Arguments:

## calculate derivative every 30 seconds
period = "30s"
5 changes: 0 additions & 5 deletions plugins/inputs/cassandra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ querying table metrics with a wildcard for the keyspace or table name.
```toml @sample.conf
# Read Cassandra metrics through Jolokia
[[inputs.cassandra]]
## DEPRECATED: The cassandra plugin has been deprecated. Please use the
## jolokia2 plugin instead.
##
## see https://github.com/influxdata/telegraf/tree/master/plugins/inputs/jolokia2

context = "/jolokia/read"
## List of cassandra servers exposing jolokia read service
servers = ["myuser:mypassword@10.10.10.1:8778","10.10.10.2:8778",":8778"]
Expand Down
5 changes: 0 additions & 5 deletions plugins/inputs/cassandra/sample.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Read Cassandra metrics through Jolokia
[[inputs.cassandra]]
## DEPRECATED: The cassandra plugin has been deprecated. Please use the
## jolokia2 plugin instead.
##
## see https://github.com/influxdata/telegraf/tree/master/plugins/inputs/jolokia2

context = "/jolokia/read"
## List of cassandra servers exposing jolokia read service
servers = ["myuser:mypassword@10.10.10.1:8778","10.10.10.2:8778",":8778"]
Expand Down
1 change: 0 additions & 1 deletion plugins/inputs/kafka_consumer_legacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ instances of telegraf can read from the same topic in parallel.
## Configuration

```toml @sample.conf
## 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+.
# Read metrics from Kafka topic(s)
[[inputs.kafka_consumer_legacy]]
## topic(s) to consume
Expand Down
1 change: 0 additions & 1 deletion plugins/inputs/kafka_consumer_legacy/sample.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
## 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+.
# Read metrics from Kafka topic(s)
[[inputs.kafka_consumer_legacy]]
## topic(s) to consume
Expand Down
1 change: 0 additions & 1 deletion plugins/inputs/logparser/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Migration Example:
## Configuration

```toml @sample.conf
## DEPRECATED: The 'logparser' plugin is deprecated in version 1.15.0, use 'inputs.tail' with 'grok' data format instead.
# Read metrics off Arista LANZ, via socket
[[inputs.logparser]]
## Log files to parse.
Expand Down
1 change: 0 additions & 1 deletion plugins/inputs/logparser/sample.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
## DEPRECATED: The 'logparser' plugin is deprecated in version 1.15.0, use 'inputs.tail' with 'grok' data format instead.
# Read metrics off Arista LANZ, via socket
[[inputs.logparser]]
## Log files to parse.
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/riemann_listener/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ client that use riemann clients using riemann-protobuff format.

```toml @sample.conf
# Riemann protobuff listener
[[inputs.rimann_listener]]
[[inputs.riemann_listener]]
## URL to listen on
## Default is "tcp://:5555"
# service_address = "tcp://:8094"
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/riemann_listener/sample.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Riemann protobuff listener
[[inputs.rimann_listener]]
[[inputs.riemann_listener]]
## URL to listen on
## Default is "tcp://:5555"
# service_address = "tcp://:8094"
Expand Down
1 change: 0 additions & 1 deletion plugins/inputs/snmp_legacy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ The SNMP input plugin gathers metrics from SNMP agents
## Configuration

```toml @sample.conf
# DEPRECATED! PLEASE USE inputs.snmp INSTEAD.
[[inputs.snmp_legacy]]
## Use 'oids.txt' file to translate oids to names
## To generate 'oids.txt' you need to run:
Expand Down
1 change: 0 additions & 1 deletion plugins/inputs/snmp_legacy/sample.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# DEPRECATED! PLEASE USE inputs.snmp INSTEAD.
[[inputs.snmp_legacy]]
## Use 'oids.txt' file to translate oids to names
## To generate 'oids.txt' you need to run:
Expand Down
26 changes: 15 additions & 11 deletions plugins/inputs/vsphere/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Compatibility information is available from the govmomi project

## Configuration

```toml
# Read metrics from one or many vCenters
```toml @sample.conf
-# Read metrics from one or many vCenters
[[inputs.vsphere]]
## List of vCenter URLs to be monitored. These three lines must be uncommented
## List of vCenter URLs to be monitored. These three lines must be uncommented
## and edited for the plugin to work.
vcenters = [ "https://vcenter.local/sdk" ]
username = "user@corp.local"
Expand Down Expand Up @@ -144,7 +144,7 @@ Compatibility information is available from the govmomi project
# datastore_metric_exclude = [] ## Nothing excluded by default
# datastore_instances = false ## false by default

## Datastores
## Datastores
# datastore_include = [ "/*/datastore/**"] # Inventory path to datastores to collect (by default all are collected)
# datastore_exclude = [] # Inventory paths to exclude
# datastore_metric_include = [] ## if omitted or empty, all metrics are collected
Expand Down Expand Up @@ -188,12 +188,6 @@ Compatibility information is available from the govmomi project
## preserve the full precision when averaging takes place.
# use_int_samples = true

## The number of vSphere 5 minute metric collection cycles to look back for non-realtime metrics. In
## some versions (6.7, 7.0 and possible more), certain metrics, such as cluster metrics, may be reported
## with a significant delay (>30min). If this happens, try increasing this number. Please note that increasing
## it too much may cause performance issues.
# metric_lookback = 3

## Custom attributes from vCenter can be very useful for queries in order to slice the
## metrics along different dimension and for forming ad-hoc relationships. They are disabled
## by default, since they can add a considerable amount of tags to the resulting metrics. To
Expand All @@ -205,19 +199,29 @@ Compatibility information is available from the govmomi project
# custom_attribute_include = []
# custom_attribute_exclude = ["*"]

## The number of vSphere 5 minute metric collection cycles to look back for non-realtime metrics. In
## some versions (6.7, 7.0 and possible more), certain metrics, such as cluster metrics, may be reported
## with a significant delay (>30min). If this happens, try increasing this number. Please note that increasing
## it too much may cause performance issues.
# metric_lookback = 3

## Optional SSL Config
# ssl_ca = "/path/to/cafile"
# ssl_cert = "/path/to/certfile"
# ssl_key = "/path/to/keyfile"
## Use SSL but skip chain & host verification
# insecure_skip_verify = false

## The Historical Interval value must match EXACTLY the interval in the daily
# "Interval Duration" found on the VCenter server under Configure > General > Statistics > Statistic intervals
# historical_interval = "5m"
```

NOTE: To disable collection of a specific resource type, simply exclude all
metrics using the XX_metric_exclude. For example, to disable collection of VMs,
add this:

```toml @sample.conf
```toml
vm_metric_exclude = [ "*" ]
```

Expand Down
Loading

0 comments on commit 96c74b5

Please sign in to comment.