47 Commits

Author SHA1 Message Date
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
bfe52cd752 Support for sub_inputs in extra plugins (#184)
Co-authored-by: Michał Lisowski <mlisowski@sentient.ie>
2024-02-28 20:00:49 +01:00
f329d9e207 Adding support for aggregators (#156)
* templates/telegraf.conf.j2: Adding aggregator support.

Adding aggregator support and tagpass/tagdrop support for
processors and aggregators.

* Adding test for aggregator templating
2022-03-21 16:45:54 +01:00
968b005f3a Add Windows feature of upgrade agents (#146) 2021-05-19 18:06:16 +02:00
9b912d8f97 Added proper newline 2020-10-16 15:37:21 +02:00
d3195b7b88 quote aws ec2 tags 2020-07-10 14:51:38 +02:00
4956663701 add queries var to template 2020-02-27 22:09:58 +03:00
a55ef0b0c0 Added extra filtering possibilities for a plugin 2019-12-01 16:23:09 +01:00
ff9a820b01 Use items() instead of iteritems()
Python3 doesn't support iteritems()
2019-06-21 13:28:18 +02:00
f59d45a167 Add processors section in Telegraf config
telegraf_processors: 
  - processor: rename
  - processor: rename.replace  
    config:
        - tag = "message"
        - dest = "messages"
2019-03-12 14:21:45 +03:30
f826414f5f Remove legacy configuration options 2019-01-21 17:24:01 +01:00
5764b4bc90 item != inputs 2019-01-21 15:37:43 +01:00
07a6cb0135 Fix tagpass & tagdrop on outputs 2019-01-21 15:34:07 +01:00
140597e41d Also fix tagpass and tagdrop for older configuration format 2019-01-21 15:04:33 +01:00
d744a12f6f Fix tagpass and tagdrop syntax 2019-01-21 15:02:32 +01:00
086dfab7d3 Add support for extra win_perf_counters and prevent python u'' strings 2018-12-13 10:42:39 -06:00
1cffd3dbc0 Renamed the tojson to to_json 2018-12-11 15:48:08 +01:00
160793b0e1 A few enhancements and fixes to windows support
- Add object to template for windows perf counters with some defaults
- Fix reference to include directory
2018-12-09 12:12:30 -06:00
73bcfaddf3 Merge pull request #70 from dj-wasabi/add-default-plugin
Added default pluging if nothing is configured
2018-11-26 17:56:42 +01:00
c9aac33197 Added default pluging if nothing is configured 2018-11-25 20:21:52 +01:00
052142e642 Added Windows as OS 2018-11-25 11:58:28 +01:00
18f5dd81b9 telegraf-extra-plugin.conf.j2: fix template typo
Related to commend : 3cccb6ba50 (r31366694)

Fix typo added in template `telegraf-extra-plugin.conf.j2`

Also add molecule tests to validate file generated with `telegraf_plugins_extra` option.

The added test template come from `Multiple inputs of the same type` (https://github.com/influxdata/telegraf/blob/master/docs/CONFIGURATION.md#multiple-inputs-of-the-same-type)
2018-11-20 15:59:45 +01:00
3cccb6ba50 Fix meta file 2018-11-19 20:20:49 +01:00
619b52b98a Use Ubuntu in Molecule Test;Fix deprecation warnings 2018-05-19 21:14:11 +02:00
e93bc95cb5 Allow overriding plugin in telegraf_plugins_extra dict 2018-05-09 11:52:58 +10:00
51ac4b7640 Convert the telegraf_plugins_extra varaible to a hash so that we can merge the hashes of multiple var files 2018-05-06 16:54:34 +10:00
a49a079664 Improved comments, split up role, moved tags and added defaults
- Added some commenting inside of defaults to clarify which variables
  adjust which files

- Split up the role taking items out of main.yml in tasks. This is to
  improve clarity of what each bit of Ansible code is doing.

- Tags were defined for each and every task within the Debian.yml moved
  ths up to main.yml so they don't need repeating every task adding
  clutter.

- Added some extra default plugins, as of current release version these
  are now within the default configuration but were missing from this
  role.

- Added some commenting inside the templates and the top of some tasks
  to clarify where the templated file was coming from.
2018-04-06 12:25:27 +01:00
5829b6bc02 tags: give an option to use AWS tags as telegraf tags
From : https://github.com/rossmcdonald/telegraf

Add `telegraf_agent_aws_tags` boolean to enable AWS tag in telegraf agent
tags section.

Also add `telegraf_agent_aws_tags_prefix` to allow usage of a prefix on AWS tags name.
2017-11-14 09:16:25 +01:00
b2a1652c47 Use telegra_global_tags for oldest telegraf versions
Users will use the same config key for global tags regardless of the
telegraf version.
Also fix the documentation about this parameter to be consistent with
changes from #37
2017-10-24 15:06:47 +02:00
87e6e95c72 Fix extra plugins by file 2017-10-23 23:10:25 -04:00
b4317d8e5d Change tags by global_tags 2017-10-23 23:10:09 -04:00
128faa55b6 Consolidate instead to a single extra-plugins conf file, to cover the case of multiple instances of same plugin 2017-02-21 10:40:19 -08:00
641981bfb3 Remove for-loop in extra-plugin template, because this is performed by the task itself. Was causing all extra plugin configurations to be written in each sub-configuration file 2017-02-20 20:24:19 -08:00
0597f0115c extra plugins tags 2017-01-20 11:58:17 +01:00
fe9f970bde Fixes closing if for tags template 2017-01-20 10:01:13 +01:00
f3f67f4f7a Input tags support 2017-01-18 21:29:42 +01:00
0405d3d993 support missing agent settings upto telegraf v1.1 2016-12-30 18:36:29 +01:00
ad1a4430c6 set telegraf hostname in defaults. 2016-09-20 15:33:07 +02:00
01d05b0a88 added template for extra plugins 2016-06-23 12:56:59 +02:00
cf37fb1d2e moved extra plugins to extra configs in telegraf.d and changed the main.yml to more yml stylish definitions 2016-04-06 16:11:48 +02:00
ec993c2066 Made it work with telegraf 0.10.0 2016-01-13 15:50:54 +01:00
5692928cb3 Removed options 2015-11-01 08:31:32 +01:00
64f62c8dc5 Update etc-opt-telegraf-telegraf.conf.j2
Fix missing line into config result after apply template
2015-10-29 10:10:06 -03:00
ef8ecffbdf Update etc-opt-telegraf-telegraf.conf.j2
Added Specifications to Extra section too.
2015-10-29 09:56:35 -03:00
3f7f83cfc4 Added iteration for specifications
with procstats plugin a new config value exist called "specifications" is similar to config but this plugin call specifications.
2015-10-29 09:49:39 -03:00
890e48c82d Added possibility to use pass, drop, tagpass, tagdrop and interval 2015-09-23 19:24:57 +02:00
03adb259af Initial version 2015-09-20 14:13:54 +02:00