generated from giantswarm/template-app
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Record memory usage per scraping job (#1156)
* record memory usage per scraping job Signed-off-by: QuentinBisson <[email protected]> * Rename --------- Signed-off-by: QuentinBisson <[email protected]>
- Loading branch information
1 parent
a929cf5
commit 9707e0e
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...rometheus-rules/templates/recording-rules/monitoring.resource-usage-estimation.rules.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |