No joy with that approach. I tried editing the ConfigMap and the CRD but both got reset when the cluster-monitoring-operator was restarted.
Looks like I'll have to live with silencing the alert.
You need to stop cluster-monitoring-operator than and then edit configmap. If cluster-monitoring-operator is running while editing configmap it will always revert it to default.
From: Tim Dudgeon <tdudgeon ml gmail com>
To: Simon Pasquier <spasquie redhat com>
Cc: users <users lists openshift redhat com>
Date: 18.11.2019 17:46
Subject: Re: Changing Prometheus rules
Sent by: users-bounces lists openshift redhat com
The KubeAPILatencyHigh alert fires several times a day for us (on 2
different OKD clusters).
On 18/11/2019 15:17, Simon Pasquier wrote:
> The Prometheus instances deployed by the cluster monitoring operator
> are read-only and can't be customized.
> Can you provide more details about which alerts are noisy?
> On Mon, Nov 18, 2019 at 2:43 PM Tim Dudgeon <tdudgeon ml gmail com> wrote:
>> What is the "right" way to edit Prometheus rules that are deployed by
>> default on OKD 3.11?
>> I have alerts that are annoyingly noisy, and want to silence them forever!
>> I tried editing the definition of the PrometheusRule CRD and/or the
>> prometheus-k8s-rulefiles-0 ConfigMap in the openshift-monitoring project
>> but my changes keep getting reverted back to the original.
>> users mailing list
>> users lists openshift redhat com
users mailing list
users lists openshift redhat com