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
- alert: DisableKubeDev | |
override: ["K8S.*"] | |
enabled: false | |
expr: '{kubernetes_cluster="kube-dev"}' |
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
# The result after pre-processing. | |
- alert: K8SNodeCPUUtilization | |
expr: K8SNodeCPUUtilization{kubernetes_cluster!="kube-dev"} > 90 | |
for: 5m | |
labels: | |
severity: high | |
annotations: | |
identifier: '{{ $labels.kubernetes_cluster }}/{{ $labels.instance_name }}' | |
msg: Node CPU ultilization by containers has been over 90% for more than 5m. |
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
# The generic rule | |
- alert: K8SNodeCPUUtilization | |
expr: K8SNodeCPUUtilization > 90 | |
for: 5m | |
labels: | |
severity: high | |
annotations: | |
identifier: '{{ $labels.kubernetes_cluster }}/{{ $labels.instance_name }}' | |
msg: Node CPU ultilization by containers has been over 90% for more than 5m. |
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
- alert: K8SNodeCPUUtilizationDev | |
override: ["K8SNodeCPUUtilization"] | |
enabled: true | |
expr: K8SNodeCPUUtilization{kubernetes_cluster="kube-dev"} | |
for: 1h | |
labels: | |
severity: warning | |
annotations: | |
identifier: '{{ $labels.kubernetes_cluster }}/{{ $labels.instance_name }}' | |
msg: Node CPU ultilization by containers has been over 90% for more than 5m. |
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
alert: K8SNodeCPUUtilization | |
Expr: node:node_container_cpu_usage_seconds:irate1m{kubernetes_cluster!="kube-dev"} / node:node_allocatable_cpu_cores:sum{kubernetes_cluster!="kube-dev"}) * 100 > 90 | |
for: 5m | |
labels: | |
group: system | |
severity: high | |
annotations: | |
identifier: '{{ $labels.kubernetes_cluster }}/{{ $labels.instance_name }}' | |
msg: Node CPU ultilization by containers has been over 90% for more than 5m. | |
reason: Node CPU ultilization by containers is high. Recalculate CPU request and |
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
alert: K8SNodeCPUUtilizationDev | |
Expr: node:node_container_cpu_usage_seconds:irate1m{kubernetes_cluster=”kube-dev”} / node:node_allocatable_cpu_cores:sum{kubernetes_cluster=”kube-dev”}) * 100 > 90 | |
for: 1h | |
labels: | |
group: system | |
severity: warning | |
annotations: | |
identifier: '{{ $labels.kubernetes_cluster }}/{{ $labels.instance_name }}' | |
msg: Node CPU ultilization by containers has been over 90% for more than 1h. | |
reason: Node CPU ultilization by containers is high. Recalculate CPU request and |
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
alert: K8SNodeCPUUtilization | |
Expr: node:node_container_cpu_usage_seconds:irate1m / node:node_allocatable_cpu_cores:sum) * 100 > 90 | |
for: 5m | |
labels: | |
group: system | |
severity: high | |
annotations: | |
identifier: '{{ $labels.kubernetes_cluster }}/{{ $labels.instance_name }}' | |
msg: Node CPU ultilization by containers has been over 90% for more than 5m. | |
reason: Node CPU ultilization by containers is high. Recalculate CPU request and |