View gist:52fd34f6503824a4f8548838a3785faf
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"}' |
View gist:0b700bb11dc78f8df9d839769b24c101
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. |
View gist:014baecac79127f74bdfd6294cae3fb4
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. |
View gist:66ae1262f36539536f749ea2d97600df
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. |
View gist:dc0343c7de5f7f4362a324aee52bdbc6
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 |
View gist:2c15961e8aaaf7d01e500edb234219c5
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 |
View gist:489928e564434e2cbd19b065c54693eb
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 |