Commit Graph

34 Commits

Author SHA1 Message Date
Mya 7d3531a29b
chore: clean up markdown lint errors input plugins w to z (#10166) 2021-11-24 11:50:22 -07:00
Paweł Żak 146fff3183
fix: Linter fixes for plugins/inputs/[t-z]* (#10105) 2021-11-18 07:22:43 -07:00
Eng Zer Jun 6a3b27126a
refactor: move from io/ioutil to io and os package (#9811) 2021-09-28 15:16:32 -06:00
Alexander Krantz 32d4234ae4
Prevent x509_cert from hanging on UDP connection (#9323) 2021-07-22 17:44:36 -07:00
Sven Rebhan d63a7010d9
Fix messing up the 'source' tag for https sources. (#9400) 2021-06-22 13:45:03 -05:00
Jarno Huuskonen ac9bf5a0ec
Fix x509_cert input plugin SNI support (#9289) 2021-06-22 11:41:45 -05:00
Sven Rebhan 9853bf6c54
Get rid of deprecated internal.{Duration,Size,Number} (#8969) 2021-04-09 13:15:04 -04:00
Sven Rebhan 8e7da355b3
Linter fixes (unhandled errors) -- Part 1 (#8992) 2021-04-08 11:43:39 -05:00
Paweł Żak 099ccda3f9
Linter fixes - gosimple (#9046) 2021-03-25 13:57:01 -04:00
jaroug b2b361356e
Wildcard support for x509_cert files (#6952)
* Accept standard unix glob matching rules

* comply with indentation

* update readme

* move globing expand and url parsing into Init()

* chore: rebase branch on upstream master

* rename refreshFilePaths to expandFilePaths
* expandFilePaths handles '/path/to/*.pem' and 'files:///path/to/*.pem'
* update sample config

* fix: recompile files globing pattern at every gather tic

 * add var globFilePathsToUrls to stack files path
 * add var globpaths to stack compiled globpath
 * rework sourcesToURLs to compile files path and stack them
 * rename expandFilePaths to expandFilePathsToUrls
 * rework expandFilePathsToUrls to only match compiled globpath
 * rework the `Gather` ticker to match globpath at each call

* fix: comply with requested changes

 * add specifics regarding relative paths in sample config
 * add logger and use it in expandFilePathsToUrls()
 * precompile glob for `files://`, `/` and `://`

* fix: update README to match last changes

* fix: comply with last requested changes

 * rename expandFilePathsToUrls() to collectCertURLs()
 * collectCertURLs() now returns []*url.URL to avoid extra field
globFilePathsToUrls in structure
 * update the Gather() ticker accordingly

* fix(windows): do not try to compile glopath for windows path as it's not supposed to be supported by the OS

* fix(ci): apply go fmt

* fix(ci): empty-lines/import-shadowing

Co-authored-by: Anthony LE BERRE <aleberre@vente-privee.com>
2021-03-23 17:31:15 -04:00
Paweł Żak 38c61c07ef
Revive fixes - part 4: (#8981)
empty-lines

Co-authored-by: Pawel Zak <Pawel Zak>
2021-03-12 14:21:51 -06:00
viperstars fe16d56a3e
inputs.x509_cert: Fix timeout issue (#8824)
* reproduce timeout issue #8809

* fix timeout issue #8809

* set default timeout to 5s

* closes #8809

Co-authored-by: 彭浩 <penghao@qiyi.com>
2021-02-16 12:11:53 -05:00
Helen Weller d41569caed
Integration test audit (#8725) 2021-01-26 11:06:12 -07:00
viperstars eda1dbc4dc
fix x509 cert timeout issue (#8741) 2021-01-26 13:02:23 -05:00
Andreas Fuchs 3c9c013f4b
common/tls: Allow specifying SNI hostnames (#7897)
* tls_config: Allow specifying SNI hostnames

Add a new configration field `tls_server_name` that allows specifying
the server name that'll be sent in the ClientHello when telegraf makes
a request to TLS servers. This allows checking against load balancers
responding to specific hostnames that otherwise wouldn't resolve to
their addresses.

Add the setting to the documentation of common TLS options, as well as
to the http_response plugin.

Fixes #7598.

* Adjust the x509_cert to allow usage of tls_server_name

This plugin has been using ServerName previously, and will have to
deal with the new setting, too: Extract the server-name choosing into
a method & add a test to ensure we choose the right value (and error
under the right circumstances). Also document that the two settings
are mutually exclusive.

* Improve documentation on what we try to accomplish in the nil return

Also get rid of the TODO, as I am fairly certain this behavior is the
correct one.

* Remove unused struct field in tests
2020-12-23 13:39:43 -06:00
Paweł Żak 0fcfee0caf
Fix tests for Windows - part 1 (#8414) 2020-11-23 10:40:32 -05:00
Russ Savage 40c6d189fe
fix(readmes): standarize first line of readmes (#7973) 2020-08-11 16:10:41 -04:00
Daniel Nelson 1adc4f0f2a
Allow any key usage type on x509 certificate (#7760) 2020-06-30 00:31:07 -07:00
Daniel Nelson c73ed8ca6c
Export internal/tls package for use in execd plugins (#7697) 2020-06-25 11:44:22 -07:00
Josh Soref bf1eb291f2
Fix assorted spelling mistakes (#7507) 2020-05-15 15:43:32 -07:00
Daniel Nelson 9747fa7f07
Update changelog 2020-01-21 17:11:50 -08:00
James Beckett 916f39d285 Add server_name override for x509_cert plugin (#6917) 2020-01-21 17:06:58 -08:00
Benjamin Schweizer 875bd7743b Only parse certificate blocks in x509_cert input (#6893) 2020-01-13 10:49:14 -08:00
Yong Wen Chua 6eb21978e6 Add additional tags for x509 Input Plugin (#6686) 2019-11-26 10:04:55 -08:00
Jonathan Negrin c53d53826d Allow multiple certificates per file in x509_cert input (#6695) 2019-11-25 15:38:57 -08:00
Greg 004b2cf578 Add intermediates when verifying cert in x509 input (#6159) 2019-07-31 16:59:54 -07:00
Greg 3e50db904a Add certificate verification status to x509_cert input (#6143) 2019-07-22 16:10:40 -07:00
Greg 1137fa50ad Continue checking cert from other sources if error occurs (#5381) 2019-02-05 17:38:04 -08:00
Daniel Nelson 1af2cf902c
Add new DN tags to x509_cert readme 2018-10-18 23:34:59 -07:00
Onur Güzel d33116381b Add certificate distinguished name as a tags in x509_cert input (#4873) 2018-10-18 23:32:43 -07:00
Fred Cox 48745c3171 Fix segfault in x509_cert (#4874) 2018-10-17 12:46:44 -06:00
Onur Güzel a21524c6b3 Add hostname to TLS config for SNI support (#4747) 2018-09-26 19:16:39 -07:00
Greg Linton 3d1c650c54 Update changelog 2018-07-30 13:14:55 -06:00
Jiri Tyr a897b84049 Adding x509_cert input plugin (#3768) 2018-07-30 13:12:45 -06:00