The bulk of this change set was automated by the following script which
is being used to aid in converting the various exporters/projects to use
slog:
https://gist.github.com/tjhop/49f96fb7ebbe55b12deee0b0312d8434
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
Update to the latest exporter-toolkit.
* Update Go to 1.19.
* Fixes CVE in exporter-toolkit.
NOTE: The config file flag has changed to `--web.config.file`.
Signed-off-by: SuperQ <superq@gmail.com>
* support modules configuration
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
* fallback default module if the param is missing
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
* update readme and example config file
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
* fix lint
Signed-off-by: Ben Ye <ben.ye@bytedance.com>
Refactor FetchJson to use a constructor.
* Cleanup nolint to use a a .golangci.yml config.
* Switch go-kit/kit/log to go-kit/log.
Signed-off-by: SuperQ <superq@gmail.com>
* Make the working of this exporter similar to that of the blackbox_exporter to allow probing multiple targets.
* Add functionality to add headers to the request
* Update the example config to use `headers` as well as the `metrics` keys in alignment with the new code
* Add default header 'Accept: application/json'
Signed-off-by: rustyclock <rustyclock@protonmail.com>