Skip to content

Request for dry-run feature #111

@k0ste

Description

@k0ste

With dry-run feature we will can to put ssl_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:
    https:
      prober: https

But

[root@mon ssl_exporter]# ./ssl_exporter --log.level=debug --web.listen-address=":9222" --config.file=ssl.yml
ts=2022-08-09T12:07:29.167Z caller=ssl_exporter.go:142 level=error msg="error parsing config file: yaml: unmarshal errors:\n  line 2: cannot unmarshal !!seq into config.Config"
[root@mon ssl_exporter]# echo $?
1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions