blackbox_exporter
blackbox_exporter copied to clipboard
enhancement: config file probe type validation
Hello,
I want to enhance the validation of config file for probe type when using --config.check option.
$ blackbox_exporter --config.check --config.file config.yml
ts=2023-10-19T08:46:20.927Z caller=main.go:86 level=info msg="Starting blackbox_exporter" version="(version=0.24.0, branch=fgx-0.24, revision=2c699796ff6809c45027247f142bc7fea13469c1)"
ts=2023-10-19T08:46:20.927Z caller=main.go:87 level=info build_context="(go=go1.20.5, platform=linux/amd64, user=fgouteroux, date=20231019-08:45:34, tags=netgo)"
ts=2023-10-19T08:46:20.953Z caller=main.go:98 level=error err="Unknown probe type 'http2' for module name 'fgx-online"
ts=2023-10-19T08:46:20.953Z caller=main.go:98 level=error err="Unknown probe type 'http1' for module name 'fgx-online-service"
hi, any feedback ?
hi, nobody for this PR ?
hi, no one for this ?
@SuperQ I add a test in main_test.go because I got an import cycle error if I put this in config/config_test.go:
package github.com/prometheus/blackbox_exporter
imports github.com/prometheus/blackbox_exporter/config
imports github.com/prometheus/blackbox_exporter/prober
imports github.com/prometheus/blackbox_exporter/config: import cycle not allowed