Closed jpdstan closed 4 years ago
Thanks for reporting this! The ruler local store is very basic at the moment, it is used mostly for "quick" testing and is nowhere near production-ready.
That being said, I think this is worth fixing.
Looks like @pstibrany is already on it 👍
and is nowhere near production-ready.
Do you actually think we're going to run into issues with this? Our plan was to migrate our current (extensive) Prometheus alerting and recording rules to a k8s ConfigMap
mounted locally, so we could continue to keep everything in git. I can see how the ruler APIs are cool, but is there any tooling right now to do things like sync a directory of rule files to the API?
Our plan was to migrate our current (extensive) Prometheus alerting and recording rules to a k8s ConfigMap mounted locally, so we could continue to keep everything in git
Of the top of my head, I don't think you'll encounter any issues going down that route. It's mostly about the lack of feature parity with the config API and the fact there's really no benefit from using local store (e.g. as described in #3134 you'll still have to write the rules to disk when polling, in this case: twice)
but is there any tooling right now to do things like sync a directory of rule files to the API?
We have some tooling in place to do this in the form of https://github.com/grafana/cortex-tools/ and https://github.com/grafana/cortex-rules-action but it might be a bit too specific depending on the way you do authentication. That being said, it should be fairly trivial to make the authentication bits optional within the CLI should there be a need for it.
On process startup, the ruler immediately fails to poll for rule groups. We get the following error:
Looking at that directory on that container, I do see the rule groups that we added:
It looks like it skips directories, but tries to follow symbolic links pointing to directories. It needs to be a bit smarter - It still needs to follow links to files, but not directories.
Our current configuration for reference:
cc @pstibrany