* 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>
* 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