Skip to content

Commit

Permalink
add mimir support for resource usage estimation recording rules (#1253)
Browse files Browse the repository at this point in the history
* add mimir support for resource usage estimation recording rules

* update mimir query

* update mimir query

* update query for mimir
  • Loading branch information
QuantumEnigmaa authored Jul 2, 2024
1 parent 9566668 commit 2840a2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Updated `monitoring.resource-usage-estimation.recording.rules` to support mimir.
- fluentbit alerts now have a dashboard
- add alert on sloth restarting too often (https://github.com/giantswarm/giantswarm/issues/31133)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ spec:
groups:
- name: monitoring.resource-usage-estimation.recording
rules:
{{- if .Values.mimir.enabled }}
- expr: (sum(scrape_samples_post_metric_relabeling) by (cluster_id, job) / on(cluster_id) group_left sum(cortex_ingester_active_series{container="ingester"}) by (cluster_id)) * on(cluster_id) group_left sum(container_memory_usage_bytes{container="ingester", namespace="mimir"}) by (cluster_id)
record: giantswarm:observability:monitoring:resource_usage_estimation:memory_usage_bytes
- expr: (sum(scrape_samples_post_metric_relabeling) by (cluster_id, job) / on(cluster_id) group_left sum(cortex_ingester_active_series{container="ingester"}) by (cluster_id)) * on(cluster_id) group_left sum(container_memory_working_set_bytes{container="ingester", namespace="mimir"}) by (cluster_id)
record: giantswarm:observability:monitoring:resource_usage_estimation:memory_working_set_bytes
{{- else }}
- expr: (count({__name__=~".+"}) by (cluster_id, job) / on(cluster_id) group_left prometheus_tsdb_head_series{instance="localhost:9090"}) * on(cluster_id) group_left sum(container_memory_usage_bytes{container="prometheus", namespace="kube-system"}) 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{instance="localhost:9090"}) * on(cluster_id) group_left sum(container_memory_working_set_bytes{container="prometheus", namespace="kube-system"}) by (cluster_id)
record: giantswarm:observability:monitoring:resource_usage_estimation:memory_working_set_bytes
{{- end }}

0 comments on commit 2840a2c

Please sign in to comment.