Commit Graph

39 Commits

Author SHA1 Message Date
Neelay Upadhyaya 0ec17e4229
feat(agent): Print plugins source information (#16270) 2025-01-22 09:35:15 -06:00
Paweł Żak 516b8cfbd1
chore: Fix linter findings for `revive:unused-receiver` in `plugins/inputs/[a-e]` (#16263) 2024-12-13 11:26:34 -06:00
Paweł Żak 7dc397a830
chore: Fix linter findings for `revive:exported` in `plugins/inputs/e*` (#16044) 2024-10-24 11:03:42 +02:00
Paweł Żak e6d82bd996
chore: Fix linter findings for `revive:enforce-repeated-arg-type-style` in `plugins/inputs/[a-g]*` (#15849) 2024-09-16 10:56:55 -05:00
Sven Rebhan b2967cb515
chore: Update go to v1.23.0 (#15766)
Co-authored-by: Pawel Zak <pawel.zak.pawel@gmail.com>
2024-08-30 14:23:51 -05:00
Joshua Powers 0a7aa308c8
feat(inputs.exec): Add option to ignore return code (#15400) 2024-06-03 11:53:14 -05:00
Paweł Żak ae7fbc5082
chore(linters): Replace 'fmt.Errorf' with 'errors.New' wherever possible (#14698) 2024-02-08 11:32:30 -06:00
Paweł Żak aa681be594
chore(linters): Remove blank identifiers and errors which are not needed to handle (#14399) 2023-12-07 08:09:01 -07:00
Paweł Żak 8fbea28ab3
chore(linters): Fix findings found by testifylint: expected-actual (#14229) 2023-11-01 14:09:55 -06:00
Sven Rebhan eb03bb5599
fix(inputs.exec): restore pre-v1.21 behavior for CSV data_format (#12533) 2023-01-26 13:51:39 -07:00
Sebastian Spaink 4913392b85
chore: Remove deprecated build tags (#11867) 2022-09-22 13:25:31 -05:00
Joshua Powers b423a3ec40
feat: migrate value parser to new style (#11407) 2022-06-29 14:46:43 -06:00
Sven Rebhan c46f42f797
feat: Migrate json parser to new style (#11226) 2022-06-22 09:56:51 -06:00
M.D fed88fcb44
feat(exec, execd): add an option to pass a custom environment to their child process (#11049) 2022-05-10 15:34:05 -06:00
Paweł Żak c875e45422
fix: Linter fixes for plugins/inputs/[a-o]* (leftovers) (#10192)
Co-authored-by: Pawel Zak <Pawel Zak>
2021-11-30 15:59:24 -06:00
Sebastian Spaink 3a7d9b6d98
fix: support 1.17 & 1.16.7 Go versions (#9642) 2021-08-23 15:37:44 -05:00
Sven Rebhan 03b2daeb1b
Linter fixes (unhandled errors) -- Part 2 (#9122) 2021-04-22 16:08:03 -05:00
Paweł Żak 74a1acd814
Linter fixes - revive:unused-parameter, unparam, varcheck and unused (#8984)
* Linter fixes - revive:unused-parameter and unparam

* Linter fixes - revive:unused-parameter and unparam

* Linter fixes - revive:unused-parameter and unparam

* "nolint"'s removed

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

* Fixes for "varcheck" and "unused" added.

Co-authored-by: Pawel Zak <Pawel Zak>
2021-03-22 12:21:36 -05:00
Steven Soroka 4dcc3c0ad7
exec plugins should not truncate messages in debug mode (#8333) 2021-03-18 17:21:30 -04:00
David Bennett c905116ade
Add 'field name' config option to customize field name when using Value parser. (#8979) 2021-03-11 21:53:32 -05:00
Paweł Żak 8a6907a186
Revive fixes - part 3 (#8872)
* * Revive fixes regarding following set of rules: [rule.var-naming]
2021-03-01 16:04:35 -05:00
Paweł Żak 0fcfee0caf
Fix tests for Windows - part 1 (#8414) 2020-11-23 10:40:32 -05:00
Daniel Nelson 74c7dd3ce7
Fix logger initialization in exec input (#6492) 2019-10-07 12:18:36 -07:00
Greg 5c8d0e3ac9 Add ability to label inputs for logging (#6207) 2019-08-21 16:49:07 -07:00
scier 60027cf902 Add support for multiple line text and perfdata to nagios parser (#5601) 2019-03-25 16:24:42 -07:00
maxunt 2729378b7f Add name, time, path and string field options to JSON parser (#4351) 2018-08-22 19:26:48 -07:00
Daniel Nelson 1c0f63a90d
Add new line protocol parser and serializer, influxdb output (#3924) 2018-03-27 17:30:51 -07:00
Patrick Hemmer 06baf7cf78 use AddError everywhere (#2372) 2017-04-24 11:13:26 -07:00
jeremydenoun ae6a5d2255 Remove warning if parse empty content (#2500)
closes #2448
2017-03-08 14:08:55 -08:00
Cameron Sparr e5c7a71d8e Fix unit tests for new metric implementation 2016-12-01 18:17:02 +00:00
Butitsnotme 4886109d9c Added option to remove all CRs from input stream
Added the option removecr to inputs.exec to remove all carraige returns
(CR, ASCII 0x0D, Unicode codepoint \u0D, ^M). The option is boolean and
not enabled if not present in the config file.

closes #1606

Updated CHANGELOG.md with information about removecr

Ran go fmt ./...

Moved removal of CRs to internal/internal.go

Moved the code to remove carriage returns from
plugins/inputs/exec/exec.go to internal/internal.go. Additionally
changed the conditional on which it gets applied from using a
configuration file option to checking if it is running on Windows.

Moved Carriage Return check to correct place

Moved the carriage return removal back to the exec plugin. Added unit
testing for it. Fixed a bug (removing too many characters).

Ran go fmt ./...

Reverted CHANGELOG to master

Updated Changelog
2016-08-31 10:32:33 +01:00
Jari Sukanen 6828fc48e1 exec plugin: allow using glob pattern in command list
Allow using glob pattern in the command list in configuration. This enables for
example placing all commands in a single directory and using /path/to/dir/*.sh
as one of the commands to run all shell scripts in that directory.

Glob patterns are applied on every run of the commands, so matching commands can
be added without restarting telegraf.

closes #1142
2016-05-26 11:38:15 +01:00
Thibault Cohen 8f09aadfdf Add nagios parser for exec input plugin
closes #762
2016-03-21 13:34:47 -06:00
Cameron Sparr e619493ece Implementing generic parser plugins and documentation
This constitutes a large change in how we will parse different data
formats going forward (for the plugins that support it)

This is working off @henrypfhu's changes.
2016-02-08 21:08:44 -07:00
Henry Hu 1449c8b887 Add Graphite line protocol parsing to exec plugin
closes #637
2016-02-08 17:12:28 -07:00
Cameron Sparr b97027ac9a Allow exec plugin to parse line-protocol
closes #613
2016-01-30 11:12:59 -07:00
Jack Zampolin 0cdf1b07e9 Fix issue 524 2016-01-20 10:57:35 -08:00
Philip Silva 3c89847489 internal: FlattenJSON, flatten arrays as well
With HTTP JSON or Elasticsearch, one can also process values nested in arrays.
2016-01-14 09:52:58 -08:00
Cameron Sparr 9c5db1057d renaming plugins -> inputs 2016-01-07 15:04:30 -07:00