ipmi_exporter icon indicating copy to clipboard operation
ipmi_exporter copied to clipboard

Request for `dry-run` feature

Open k0ste opened this issue 3 years ago • 0 comments

With dry-run feature we will can to put ipmi_exporter configuration and perform syntax test (exporter can run with this YAML) before restart with new configuration (useful for IaC's)

For example, this YAML seems legit

---
- modules:
    intel:
      collectors:
        - ipmi

But

[root@mon ipmi_exporter]# ./ipmi_exporter --web.listen-address=":9222" --log.level=debug --config.file=ipmi.yml
ts=2022-08-12T14:33:02.890Z caller=main.go:107 level=info msg="Starting ipmi_exporter" version="(version=1.6.1, branch=HEAD, revision=344b8b4a565a9ced936aad4d4ac9a29892515cba)"
ts=2022-08-12T14:33:02.890Z caller=main.go:111 level=error msg="Error parsing config file" error="yaml: unmarshal errors:\n  line 2: cannot unmarshal !!seq into main.plain"
[root@mon ipmi_exporter]# echo $?
1

Will be nice if we can check it, like ./ipmi_exporter --config.file=/path/to/file.yaml --dry-run and check for non-zero exit-code

k0ste avatar Aug 12 '22 14:08 k0ste