Skip to content

Commit f32eaf3

Browse files
Smitha SubbaraoSmitha Subbarao
authored andcommitted
ROKS 4.8: Add Prometheus API alert
1 parent cea1399 commit f32eaf3

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Source: https://github.com/openshift/cluster-kube-apiserver-operator/blob/release-4.10/bindata/assets/alerts/api-usage.yaml
1+
# Source: https://github.com/openshift/cluster-kube-apiserver-operator/blob/release-4.8/bindata/v4.1.0/alerts/api-usage.yaml
22
apiVersion: monitoring.coreos.com/v1
33
kind: PrometheusRule
44
metadata:
@@ -10,29 +10,26 @@ spec:
1010
rules:
1111
- alert: APIRemovedInNextReleaseInUse
1212
annotations:
13-
summary: Deprecated API that will be removed in the next version is being used.
14-
description: >-
13+
message: >-
1514
Deprecated API that will be removed in the next version is being used. Removing the workload that is using
1615
the {{ `{{ $labels.group }}.{{ $labels.version }}/{{ $labels.resource }}` }} API might be necessary for
1716
a successful upgrade to the next cluster version.
1817
Refer to `oc get apirequestcounts {{ `{{ $labels.resource }}.{{ $labels.version }}.{{ $labels.group }}` }} -o yaml` to identify the workload.
1918
expr: |
20-
group(apiserver_requested_deprecated_apis{removed_release="1.23"}) by (group,version,resource) and (sum by(group,version,resource) (rate(apiserver_request_total{system_client!="kube-controller-manager",system_client!="cluster-policy-controller"}[4h]))) > 0
19+
group(apiserver_requested_deprecated_apis{removed_release="1.22"}) by (group,version,resource) and (sum by(group,version,resource) (rate(apiserver_request_total{system_client!="kube-controller-manager",system_client!="cluster-policy-controller"}[4h]))) > 0
2120
for: 1h
2221
labels:
23-
namespace: openshift-kube-apiserver
2422
severity: info
2523
- alert: APIRemovedInNextEUSReleaseInUse
2624
annotations:
27-
summary: Deprecated API that will be removed in the next EUS version is being used.
28-
description: >-
25+
message: >-
2926
Deprecated API that will be removed in the next EUS version is being used. Removing the workload that is using
3027
the {{ `{{ $labels.group }}.{{ $labels.version }}/{{ $labels.resource }}` }} API might be necessary for
3128
a successful upgrade to the next EUS cluster version.
3229
Refer to `oc get apirequestcounts {{ `{{ $labels.resource }}.{{ $labels.version }}.{{ $labels.group }}` }} -o yaml` to identify the workload.
3330
expr: |
3431
group(apiserver_requested_deprecated_apis{removed_release=~"1\\.2[123]"}) by (group,version,resource) and (sum by(group,version,resource) (rate(apiserver_request_total{system_client!="kube-controller-manager",system_client!="cluster-policy-controller"}[4h]))) > 0
32+
3533
for: 1h
3634
labels:
37-
namespace: openshift-kube-apiserver
3835
severity: info

pkg/assets/bindata.go

Lines changed: 5 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)