improve acuracy for context switching query

This commit is contained in:
Samuel Berthe 2020-05-04 00:05:33 +02:00
parent 790139211e
commit eb8dc736a3
No known key found for this signature in database
GPG key ID: 64863511FFBD0E3C

View file

@ -169,7 +169,7 @@ groups:
severity: warning
- name: Host context switching
description: Context switching is growing on node (> 1000 / s)
query: "rate(node_context_switches_total[5m]) > 1000"
query: "(rate(node_context_switches_total[5m])) / (count without(cpu, mode) (node_cpu_seconds_total{mode="idle"})) > 1000"
severity: warning
comments: |
1000 context switches is an arbitrary number.