Open andres32168 opened 10 months ago
you can also combine the rule groups from the two files into a single file and feed that into mimirtool.
Mimir itself can only maintain a single set of rule groups per namespace. providing multiple requires mimirtool to do some preprocessing of the files. Whatever that preprocessing is (combining or choosing first/last set of groups to upload), I think it would not be immediately obvious to a user.
Yes, we could combine them into a single file and maybe we need to do it. It would be nice to have it in single files because we have a selfservice in our company where every developer writes the alerting rules by his self for his services in multiple files and afterwards we merge them together into a single file. Now we want to introduce recording rules and it would be nice to have 2 files, 1 for alerting and 1 for recording rules.
I not see any issue . If you just exprted kube-prmetheus-stack rules and alerts then files have symbolic links. You need to write your command as this:
mimirtool rules sync --address=http://localhost:33097 --id=mimir_cluster --rule-dirs=./etc/prometheus/rules/prometheus-prometheus-stack-kube-prom-prometheus-rulefiles-0/..data/
Describe the bug
A clear and concise description of what the bug is.
Mimirtool does not allow to load or sync multiple files within the same namespace For example
alerts.yaml
andrules.yaml
from the mimir-mixin-compiled are not allowed to be deployed to the same namespace: Adding a namespace toalerts.yaml
In my opinion both , rules and alerts, belong to mimir which should be only 1 namespace and not 2.
Of course, it would be possible to have 2 different namespaces for example
mimir-rules
andmimir-alerts
but both belong to mimir and it should be possible to load both into the same namespace.To Reproduce
Steps to reproduce the behavior:
namespace
to multiple files (see above)or
Expected behavior
Multiple files could take the same namespace
Environment
Mimirtool, version 2.10.4 (branch: release-2.10, revision: https://github.com/grafana/mimir/commit/d1f4f1291001db7384ba66ca90b4f753309f262d)
Additional Context