Skip to content

Commit b11e21e

Browse files
committed
Add intial prometheus rules for cardinality analysis
Signed-off-by: ArthurSens <[email protected]>
1 parent e84bd1f commit b11e21e

File tree

1 file changed

+23
-0
lines changed
  • operations/observability/mixins/self-hosted/rules/cardinality-analysis

1 file changed

+23
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2022 Gitpod GmbH. All rights reserved.
2+
# Licensed under the GNU Affero General Public License (AGPL).
3+
# See License-AGPL.txt in the project root for license information.
4+
5+
apiVersion: monitoring.coreos.com/v1
6+
kind: PrometheusRule
7+
metadata:
8+
labels:
9+
app.kubernetes.io/name: cardinality-analisis
10+
app.kubernetes.io/part-of: kube-prometheus
11+
prometheus: k8s
12+
role: alert-rules
13+
name: cardinality-analisis-monitoring-rules
14+
namespace: monitoring-satellite
15+
spec:
16+
groups:
17+
- name: cardinality-analisis
18+
rules:
19+
- record: metrics_total
20+
expr: count(count({__name__!=""}) by (__name__))
21+
22+
- record: __name__:timeseries_total
23+
expr: count({__name__!=""}) by (__name__)

0 commit comments

Comments
 (0)