Skip to content

Commit 03eadcf

Browse files
authored
feat(SPRE-1702): Test Recording Rules (#7429)
* feat(SPRE-1702): Test Recording Rules Signed-off-by: Gabriel Soares <[email protected]> * feat(SPRE-1702): Fix kustomization Signed-off-by: Gabriel Soares <[email protected]> --------- Signed-off-by: Gabriel Soares <[email protected]>
1 parent 8ef1267 commit 03eadcf

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

components/monitoring/prometheus/staging/stone-stg-rh01/kustomization.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
44
- ../base
5+
- prometheus_rule_test.yaml
56

67
patches:
78
- path: cluster-id-label.yaml
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: monitoring.rhobs/v1
2+
kind: PrometheusRule
3+
metadata:
4+
name: coo-prometheus-recording-rules
5+
namespace: appstudio-monitoring
6+
labels:
7+
kubernetes.io/part-of: appstudio-federate-ms
8+
monitoring.rhobs/stack: appstudio-federate-ms
9+
spec:
10+
groups:
11+
- name: rules_container_memory_working_set_bytes
12+
rules:
13+
- expr: |
14+
avg by (node,namespace,container) (rate(container_memory_working_set_bytes{job="kubelet", metrics_path="/metrics/cadvisor", image!=""}[5m])
15+
* on (cluster, namespace, pod) group_left(node) topk by(cluster, namespace, pod) (1,
16+
max by(cluster, namespace, pod, node) (kube_pod_info{node!=""})
17+
))
18+
record: node_namespace_container:container_memory_working_set_bytes

0 commit comments

Comments
 (0)