mimir
mimir copied to clipboard
Create a configuration validation command (probably in `mimirtool`)
Is your feature request related to a problem? Please describe.
There's no way of knowing beforehand whether a configuration file is valid or not, which may cause issues when it's rendered in CI and applied automatically.
Describe the solution you'd like
François GOUTEROUX suggested to implement a check command in mimirtool
just like grafana agent did, something like:
mimirtool config check /etc/mimir/config.yaml
Describe alternatives you've considered
Maybe make a Mimir target that doesn't do anything except validating the configuration? This would probably be easier to implement and maintain code-wise (since we'd reuse the same configuration parsaing)
Additional context
Add any other context or screenshots about the feature request here.
It's a bit obscure, but I think you get it in practice running mimir --modules=true
, because it validates the config and print modules, then exit.
It's a bit obscure, but I think you get it in practice running
mimir --modules=true
, because it validates the config and print modules, then exit.
Ok it do the job
mimir --modules=true -config.file /etc/mimir/bad-config.yaml
error loading config from /etc/mimir/config2.yaml: Error parsing config file: yaml: unmarshal errors:
line 55: field instance_availability_zone not found in type querier.Config
@pracucci maybe we could make that prettier or at least document that?
That's what I had in mind when I considered making it a Mimir target.