9 Commits

Author SHA1 Message Date
8670792f6f Updated CHANGELOG.md on "2025-02-07 17:54:47" 2025-02-07 17:54:47 +00:00
4803b33f89 Better sub inputs handling (#193)
* Support for sub_inputs in extra plugins

* fix: properly handle lists as TOML arrays

- Updated the Jinja template to detect and serialize lists using |to_json,
  ensuring Telegraf interprets them correctly (e.g. names = ["item1","item2"]).
- Removed fallback logic for single items, so we consistently treat all sub_input
  values as lists of dictionaries.

---------

Co-authored-by: Michał Lisowski <mlisowski@sentient.ie>
2025-02-07 18:54:09 +01:00
0c7f32937f Updated CHANGELOG.md on "2024-12-04 07:28:29" 2024-12-04 07:28:29 +00:00
2f2619580b Bump ansible-core from 2.18.0 to 2.18.1 (#192)
Bumps [ansible-core](https://github.com/ansible/ansible) from 2.18.0 to 2.18.1.
- [Release notes](https://github.com/ansible/ansible/releases)
- [Commits](https://github.com/ansible/ansible/compare/v2.18.0...v2.18.1)

---
updated-dependencies:
- dependency-name: ansible-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-04 08:27:47 +01:00
9363cfd04b Updated CHANGELOG.md on "2024-11-26 14:21:50" 2024-11-26 14:21:50 +00:00
ff77201873 Bump ansible-core from 2.16.8 to 2.18.0 (#191)
Bumps [ansible-core](https://github.com/ansible/ansible) from 2.16.8 to 2.18.0.
- [Release notes](https://github.com/ansible/ansible/releases)
- [Commits](https://github.com/ansible/ansible/compare/v2.16.8...v2.18.0)

---
updated-dependencies:
- dependency-name: ansible-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-26 15:21:13 +01:00
9febe3fa4c Updated CHANGELOG.md on "2024-11-26 13:22:27" 2024-11-26 13:22:27 +00:00
45ad4915eb Updating CHANGELOG.md file for release 0.14.2 2024-11-26 14:21:56 +01:00
b798c93a6a Updating CONTRIBUTORS file for release 0.14.2 2024-11-26 14:21:23 +01:00
5 changed files with 31 additions and 10 deletions

View File

@ -2,7 +2,17 @@
## [Unreleased](https://github.com/dj-wasabi/ansible-telegraf/tree/HEAD) ## [Unreleased](https://github.com/dj-wasabi/ansible-telegraf/tree/HEAD)
[Full Changelog](https://github.com/dj-wasabi/ansible-telegraf/compare/0.14.1...HEAD) [Full Changelog](https://github.com/dj-wasabi/ansible-telegraf/compare/0.14.2...HEAD)
**Merged pull requests:**
- Better sub inputs handling [\#193](https://github.com/dj-wasabi/ansible-telegraf/pull/193) ([lisuml](https://github.com/lisuml))
- Bump ansible-core from 2.18.0 to 2.18.1 [\#192](https://github.com/dj-wasabi/ansible-telegraf/pull/192) ([dependabot[bot]](https://github.com/apps/dependabot))
- Bump ansible-core from 2.16.8 to 2.18.0 [\#191](https://github.com/dj-wasabi/ansible-telegraf/pull/191) ([dependabot[bot]](https://github.com/apps/dependabot))
## [0.14.2](https://github.com/dj-wasabi/ansible-telegraf/tree/0.14.2) (2024-11-26)
[Full Changelog](https://github.com/dj-wasabi/ansible-telegraf/compare/0.14.1...0.14.2)
**Implemented enhancements:** **Implemented enhancements:**
@ -172,7 +182,6 @@
- Some changes for fixing FreeBSD [\#101](https://github.com/dj-wasabi/ansible-telegraf/pull/101) ([dj-wasabi](https://github.com/dj-wasabi)) - Some changes for fixing FreeBSD [\#101](https://github.com/dj-wasabi/ansible-telegraf/pull/101) ([dj-wasabi](https://github.com/dj-wasabi))
- basic FreeBSD support [\#100](https://github.com/dj-wasabi/ansible-telegraf/pull/100) ([langerma](https://github.com/langerma)) - basic FreeBSD support [\#100](https://github.com/dj-wasabi/ansible-telegraf/pull/100) ([langerma](https://github.com/langerma))
- Added the use\_proxy argument to use a proxy \(or not\) [\#98](https://github.com/dj-wasabi/ansible-telegraf/pull/98) ([dj-wasabi](https://github.com/dj-wasabi)) - Added the use\_proxy argument to use a proxy \(or not\) [\#98](https://github.com/dj-wasabi/ansible-telegraf/pull/98) ([dj-wasabi](https://github.com/dj-wasabi))
- Various small changes for molecule [\#97](https://github.com/dj-wasabi/ansible-telegraf/pull/97) ([dj-wasabi](https://github.com/dj-wasabi))
## [0.12.0](https://github.com/dj-wasabi/ansible-telegraf/tree/0.12.0) (2019-03-12) ## [0.12.0](https://github.com/dj-wasabi/ansible-telegraf/tree/0.12.0) (2019-03-12)
@ -188,6 +197,7 @@
**Merged pull requests:** **Merged pull requests:**
- Various small changes for molecule [\#97](https://github.com/dj-wasabi/ansible-telegraf/pull/97) ([dj-wasabi](https://github.com/dj-wasabi))
- Add processors section in Telegraf config [\#94](https://github.com/dj-wasabi/ansible-telegraf/pull/94) ([ph4r5h4d](https://github.com/ph4r5h4d)) - Add processors section in Telegraf config [\#94](https://github.com/dj-wasabi/ansible-telegraf/pull/94) ([ph4r5h4d](https://github.com/ph4r5h4d))
- Updated to Telegraf 1.10.0;Different installation methods [\#93](https://github.com/dj-wasabi/ansible-telegraf/pull/93) ([dj-wasabi](https://github.com/dj-wasabi)) - Updated to Telegraf 1.10.0;Different installation methods [\#93](https://github.com/dj-wasabi/ansible-telegraf/pull/93) ([dj-wasabi](https://github.com/dj-wasabi))
- Updating Telegraf default to 1.9.5 [\#92](https://github.com/dj-wasabi/ansible-telegraf/pull/92) ([sdurrheimer](https://github.com/sdurrheimer)) - Updating Telegraf default to 1.9.5 [\#92](https://github.com/dj-wasabi/ansible-telegraf/pull/92) ([sdurrheimer](https://github.com/sdurrheimer))

View File

@ -10,6 +10,7 @@
Diego Nava Diego Nava
Emerson Knapp Emerson Knapp
Farshad Nematdoust Farshad Nematdoust
Frank Villaro-Dixon
Greg Greg
Harald Kraemer Harald Kraemer
Heckel, Robert J Heckel, Robert J
@ -26,6 +27,8 @@
Markus Langer Markus Langer
Matt Matt
Max Nasonov Max Nasonov
Michał Lisowski
Mira
Miro Prasil Miro Prasil
Miroslav Prasil Miroslav Prasil
NotDead NotDead
@ -40,6 +43,7 @@
Romain BUREAU Romain BUREAU
Ryan Conway Ryan Conway
Simo Tuomisto Simo Tuomisto
Simon
Slawomir Skowron Slawomir Skowron
Steve Durrheimer Steve Durrheimer
Steven Wirges Steven Wirges
@ -47,6 +51,7 @@
Thomas Szymanski Thomas Szymanski
ThorstenHeck ThorstenHeck
Troy Jendra Troy Jendra
Vinicius Freitas
Werner Dijkerman Werner Dijkerman
Werner Dijkerman [GH bot] Werner Dijkerman [GH bot]
aroglian aroglian

View File

@ -342,13 +342,13 @@ sqs:
- statistic_include = ["average"] - statistic_include = ["average"]
sub_inputs: sub_inputs:
metrics: metrics:
- names = [ - names: [
"ApproximateAgeOfOldestMessage", "ApproximateAgeOfOldestMessage",
"ApproximateNumberOfMessagesVisible", "ApproximateNumberOfMessagesVisible",
] ]
metrics.dimensions: metrics.dimensions:
- name = "QueueName" - name: "QueueName"
- value = "*" value: "*"
``` ```
## Dependencies ## Dependencies

View File

@ -1,6 +1,6 @@
ansible==9.7.0 ansible==9.7.0
ansible-compat==24.10.0 ansible-compat==24.10.0
ansible-core==2.16.8 ansible-core==2.18.1
docker==7.1.0 docker==7.1.0
molecule==6.0.3 molecule==6.0.3
molecule-docker==2.1.0 molecule-docker==2.1.0

View File

@ -56,10 +56,16 @@
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if item.value.sub_inputs is defined and item.value.sub_inputs is iterable %} {% if item.value.sub_inputs is defined and item.value.sub_inputs is iterable %}
{% for sub_input, config in item.value.sub_inputs.items() %} {% for sub_input_key, sub_input_list in item.value.sub_inputs.items() %}
[[inputs.{{ item.value.plugin | default(item.key) }}.{{ sub_input }}]] {% for block in sub_input_list %}
{% for items in config %} [[inputs.{{ item.value.plugin | default(item.key) }}.{{ sub_input_key }}]]
{{ items }} {% for param_key, param_value in block.items() %}
{% if param_value is sequence and param_value is not string %}
{{ param_key }} = {{ param_value | to_json }}
{% else %}
{{ param_key }} = "{{ param_value }}"
{% endif %}
{% endfor %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}