Commit Graph

33 Commits

Author SHA1 Message Date
Sebastian Spaink 4913392b85
chore: Remove deprecated build tags (#11867) 2022-09-22 13:25:31 -05: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
Eng Zer Jun 6a3b27126a
refactor: move from io/ioutil to io and os package (#9811) 2021-09-28 15:16:32 -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 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
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
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
Helen Weller ef6ce2c9d9
fixed network test (#8498) 2020-12-04 12:08:11 -05:00
Paweł Żak 0fcfee0caf
Fix tests for Windows - part 1 (#8414) 2020-11-23 10:40:32 -05:00
Labesse Kévin 527a11a656
http_response: match on status code (#8032) 2020-10-16 11:40:17 -06:00
Nicolas Filotto bf0f674458
Add ability to collect response body as field with http_response (#7596) 2020-06-08 15:29:34 -07:00
Nicolas Filotto 430854f6de
Fix segmentation violation on connection failed (#7593) 2020-05-28 11:05:57 -07:00
Nicolas Filotto 7ef1d53551
Allow collection of HTTP Headers in http_response input (#7405) 2020-05-26 15:52:13 -07:00
Josh Soref 2c56d6de81
Fix spelling errors in comments and documentation (#7492) 2020-05-14 00:41:58 -07:00
Darin Fisher 670277f785
Add authentication support to the http_response input plugin (#7491) 2020-05-12 14:01:17 -07:00
Greg 817c9a69a9 Document and add support to input plugins for logging alias (#6357) 2019-09-23 15:39:50 -07:00
Daniel Nelson 15dd43344d
Fix error reading closed response body on redirect (#6372) 2019-09-10 11:04:24 -07:00
Pavel Frolov 50dc8d5659 Add content_length metric to http_response input plugin (#6261) 2019-08-16 15:45:20 -07:00
George 8d04cb76fd Add support for interface field in http_response input plugin (#6006) 2019-06-19 13:40:53 -07:00
maxunt 96cb0aaea0 Fix unit tests on Darwin (#4458) 2018-07-27 18:29:54 -07:00
Daniel Nelson 0aad487cab
Fix go vet and use go test -race 2018-04-02 14:30:46 -07:00
Germán Jaber 81a93fcddf Add result related tags and fields to http_response (#3814) 2018-03-08 14:55:59 -08:00
Frederick Roth 91f2764cd5 Add result_type field for http_response input (#2814) 2017-06-06 13:39:07 -07:00
Frederick Roth ac5ac3161f Fixed inconsistency between HasIntField and IntField (#2813) 2017-05-16 15:25:30 -07:00
Daniel Nelson 1931aac284
Fix http_response input creation of transport on every gather 2017-05-09 16:23:38 -07:00
Patrick Hemmer 1402c158b7 remove sleep from tests (#2555) 2017-03-24 12:03:36 -07:00
Len Smith 9003efc3fa http_response : Add in support for looking for substring in response (#2204)
* Add in support for looking for substring in response

* Add note to CHANGELOG.md

* Switch from substring match to regex match

* Requested code changes

* Make requested changes and refactor to avoid nested if-else.

* Convert tabs to space and compile regex once
2017-02-01 14:21:08 +00:00
Cameron Sparr c44ecf54a5 Utilize timeout in net_response plugin.
Also changing the net_response and http_response plugins to only accept
duration strings for their timeout parameters. This is a breaking config
file change.

closes #1214
2016-05-23 15:59:23 +01:00
Cameron Sparr f176c28a56 http_response: override req.Host header properly
closes #1198
2016-05-19 13:19:51 +01:00
Luke Swithenbank 377b030d88 update to 5 second default and string map for headers 2016-04-07 10:28:39 -06:00
Luke Swithenbank 437bd87d7c added tests and did some refactoring 2016-04-07 10:28:39 -06:00