Open KR411-prog opened 4 years ago
Here is an example how to do this: https://github.com/openshift/cluster-monitoring-operator/blob/release-4.4/jsonnet/main.jsonnet#L37-L61
Mind be good to document this in our README, if we do not have it already. Do you mind @KR411-prog creating a PR to add an example if the above works for you? Thanks! 🎉 :)
We are currently using https://github.com/openshift/cluster-monitoring-operator/blob/master/jsonnet/patch-rules.libsonnet to patch or disable rules. It is super handy and easy to use for our usecase. Might be worth mentioning somewhere in the document.
It might be good to port it into https://github.com/prometheus-operator/kube-prometheus/tree/main/jsonnet/kube-prometheus/lib, use in https://github.com/prometheus-operator/kube-prometheus/blob/main/examples/changing-default-rules.libsonnet and amend our docs in https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/developing-prometheus-rules-and-grafana-dashboards.md#changing-default-rules#735
any takers? :)
@dgrisonnet wdyt about moving that patch functions into kube-prometheus and amending CMO codebase to use ported ones?
Happy to move the patch functions to kube-prometheus if they can be useful to the community :)
/cc @raptorsun
I am going to work on this issue 🙋♂️
I have below code in jsonnet which does update default rule,create a new rule..This works fine. But I want to delete the rule "AggregateAPIDown".I am not sure how to do this in jsonnet.
I tried this,
But its not removing the rule. Please let me know how to achieve this.
Here is the full code,