Update Context Switch Check to use Prometheus as Datasource
The previous method of using data returned by node_exporter was invalid, as it returns a total since boot. The new method queries Prometheus to get a rate change of the same metric: ```shell HW_CONTEXT_SWITCH_RATE=$(curl -fs --data-urlencode "query=irate(node_context_switches_total{job=\"compute-node\",name=\"$NODENAME\"}[$HW_CONTEXT_SWITCH_INTERVAL])" http://nagios.rc.uab.edu:9090/api/v1/query | jq -r '.data.result[] | .value[1]') ```
parent
9d411ec3
No related branches found
No related tags found
Loading
Please register or sign in to comment