This plugin provides native CPU instrumentation for monitoring and metrics collection, including: CPU usage and metrics for user, nice, system, idle, iowait, irq, softirq, steal, and guest.
Currently check_cpu plugin only picks idle as a metric of CPU idle time, but this doesn't always give desired results. At least iowait needs to be included there considering the purpose of this plugin. Besides, steal, guest and guest_nice should be taken into account because they are involuntary time consumption outside the VM.
This patch adds guest_nice to the line-ups of metrics, which has been available in Linux since 2.6.33.
This patch also adds a new option --idle-metrics whose value specifies the names of the metrics that are included in the calculation of CPU idle time as a comma-separated string. The value defaults to idle,iowait,steal,guest,guest_nice
(Originally posted as https://github.com/sensu/sensu-community-plugins/pull/1253 )
Currently check_cpu plugin only picks
idle
as a metric of CPU idle time, but this doesn't always give desired results. At leastiowait
needs to be included there considering the purpose of this plugin. Besides,steal
,guest
andguest_nice
should be taken into account because they are involuntary time consumption outside the VM.This patch adds
guest_nice
to the line-ups of metrics, which has been available in Linux since 2.6.33.This patch also adds a new option
--idle-metrics
whose value specifies the names of the metrics that are included in the calculation of CPU idle time as a comma-separated string. The value defaults toidle,iowait,steal,guest,guest_nice