diff --git a/CHANGELOG.md b/CHANGELOG.md index c65540382..0c1f44153 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Add recording rules to show prometheus scraping job memory usage. - Add `cluster_control_plane_unhealthy` inhibition. - Added inhibitions expressions for CAPI clusters. - make targets for pint linter diff --git a/helm/prometheus-rules/templates/recording-rules/monitoring.resource-usage-estimation.rules.yaml b/helm/prometheus-rules/templates/recording-rules/monitoring.resource-usage-estimation.rules.yaml new file mode 100644 index 000000000..1f2973749 --- /dev/null +++ b/helm/prometheus-rules/templates/recording-rules/monitoring.resource-usage-estimation.rules.yaml @@ -0,0 +1,15 @@ +apiVersion: monitoring.coreos.com/v1 +kind: PrometheusRule +metadata: + labels: + {{- include "labels.common" . | nindent 4 }} + name: monitoring.resource-usage-estimation.recording.rules + namespace: {{ .Values.namespace }} +spec: + groups: + - name: monitoring.resource-usage-estimation.recording + rules: + - expr: (count({__name__=~".+"}) by (cluster_id, job) / on(cluster_id) group_left prometheus_tsdb_head_series) * on(cluster_id) group_left sum(container_memory_usage_bytes{container="prometheus"}) by (cluster_id) + record: giantswarm:observability:monitoring:resource_usage_estimation:memory_usage_bytes + - expr: (count({__name__=~".+"}) by (cluster_id, job) / on(cluster_id) group_left prometheus_tsdb_head_series) * on(cluster_id) group_left sum(container_memory_working_set_bytes{container="prometheus"}) by (cluster_id) + record: giantswarm:observability:monitoring:resource_usage_estimation:memory_working_set_bytes