Support for sub_inputs in extra plugins (#184)

Co-authored-by: Michał Lisowski <mlisowski@sentient.ie>
This commit is contained in:
Michał Lisowski
2024-02-28 20:00:49 +01:00
committed by GitHub
parent b5179f4dfe
commit bfe52cd752
2 changed files with 33 additions and 0 deletions

View File

@ -289,6 +289,7 @@ Telegraf plugin options:
* `interval`: How often to gather this metric. Normal plugins use a single global interval, but if one particular plugin should be run less or more often, you can configure that here.
* `filter.name`: Like when there is an extra filter that needs to be configured, like `grok` for a `logparser` plugin.
* `filter.config`: The extra configuration for the - in the `filter.name` example - `grok` filter. (See example below)
* `sub_inputs`: If the input requires other sub inputs, you can add them here (see example below).
An example might look like this:
@ -325,6 +326,30 @@ When you want to make use of the `grok` filter for the logparser:
config:
- patterns = ["invoked oom-killer"]
When you want to include a sub inputs with their own configuration:
```yaml
sqs:
plugin: cloudwatch
config:
- region = "eu-west-1"
- access_key = "foo"
- secret_key = "bar"
- period = "1m"
- delay = "2m"
- interval = "1m"
- namespace = "AWS/SQS"
- statistic_include = ["average"]
sub_inputs:
metrics:
- names = [
"ApproximateAgeOfOldestMessage",
"ApproximateNumberOfMessagesVisible",
]
metrics.dimensions:
- name = "QueueName"
- value = "*"
```
## Dependencies
No dependencies