-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[kube-prometheus-stack] update recording rules #39
[kube-prometheus-stack] update recording rules #39
Conversation
Signed-off-by: frezes <[email protected]>
e3e9c6b
to
f227a2f
Compare
@@ -46,7 +46,26 @@ spec: | |||
{{- toYaml . | nindent 8 }} | |||
{{- end }} | |||
{{- end }} | |||
- expr: sum by (cluster, node, instance, host_ip)(node_memory_MemTotal_bytes{job="node-exporter"} -(node_memory_MemAvailable_bytes{job="node-exporter"} or (node_memory_Buffers_bytes{job="node-exporter"} + node_memory_Cached_bytes{job="node-exporter"} + node_memory_MemFree_bytes{job="node-exporter"} + node_memory_Slab_bytes{job="node-exporter"}))) * on (cluster,node) group_left(role) ((kube_node_role{job="kube-state-metrics", role="worker"} unless ignoring (role) kube_node_role{job="kube-state-metrics", role="control-plane"}) or kube_node_role{job="kube-state-metrics", role="control-plane"}) | |||
- expr: |- | |||
sum by (cluster, node) ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's safe to remove instance, host_ip?
@@ -57,7 +76,12 @@ spec: | |||
{{- toYaml . | nindent 8 }} | |||
{{- end }} | |||
{{- end }} | |||
- expr: sum by (cluster, node, instance, host_ip, role)(node_memory_MemTotal_bytes{job="node-exporter"} * on (cluster,node) group_left(role) ((kube_node_role{job="kube-state-metrics", role="worker"} unless ignoring (role) kube_node_role{job="kube-state-metrics", role="control-plane"}) or kube_node_role{job="kube-state-metrics", role="control-plane"})) | |||
- expr: |- | |||
sum by (cluster, node) ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
safe to remove instance, host_ip, role?
@@ -68,8 +92,8 @@ spec: | |||
{{- toYaml . | nindent 8 }} | |||
{{- end }} | |||
{{- end }} | |||
- expr: node:node_filesystem_bytes_used_total:sum / node:node_filesystem_bytes_total:sum | |||
record: node:node_filesystem_utilisation:ratio | |||
- expr: node:node_device_filesystem_bytes_used_total:sum / node:node_device_filesystem_bytes_total:sum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason of changing node:node_filesystem_bytes_
to node:node_device_filesystem_bytes_
?
max by (cluster, node, instance, host_ip, device) ( | ||
node_filesystem_size_bytes{device=~"/dev/.*",device!~"/dev/loop\\d+", job="node-exporter"} | ||
) * on (cluster,node) group_left(role) ((kube_node_role{job="kube-state-metrics", role="worker"} unless ignoring (role) kube_node_role{job="kube-state-metrics", role="control-plane"}) or kube_node_role{job="kube-state-metrics", role="control-plane"}) | ||
sum by (cluster, node, device) ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again instance, host_ip are not necessary?
@@ -134,7 +214,12 @@ spec: | |||
{{- toYaml . | nindent 8 }} | |||
{{- end }} | |||
{{- end }} | |||
- expr: sum by(cluster,node,host_ip,role)(kube_pod_status_scheduled{job="kube-state-metrics", condition="true"} * on(cluster,namespace,pod) group_left(node,host_ip,role) workspace_workload_node:kube_pod_info:) | |||
- expr: |- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
host_ip,role also removed here
What this PR does / why we need it
Which issue this PR fixes
(optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close that issue when PR gets merged)Special notes for your reviewer
Checklist
[prometheus-couchdb-exporter]
)