cpu_utilization

check_cpu_utilization

Checks the cpu utilization metrics.

Implementation

WindowsLinuxFreeBSDMacOSX

Examples

Default Check

check_cpu_utilization

OK - user: 2% - system: 1% - iowait: 0% - steal: 0% - guest: 0 - idle: 96% |‘total’=3.4%;90;95;0; ‘user’=2.11%;;;0;…

Example using NRPE and Naemon

Naemon Config

define command{
    command_name         check_nrpe
    command_line         $USER1$/check_nrpe -H $HOSTADDRESS$ -n -c $ARG1$ -a $ARG2$
}

define service {
    host_name            testhost
    service_description  check_cpu_utilization
    use                  generic-service
    check_command        check_nrpe!check_cpu_utilization!'warn=total > 90%' 'crit=total > 95%'
}

Argument Defaults

ArgumentDefault Value
warningtotal > 90
criticaltotal > 95
empty-state0 (OK)
empty-syntax
top-syntax${status} - ${list}
ok-syntax
detail-syntaxuser: ${user}% - system: ${system}% - iowait: ${iowait}% - steal: ${steal}% - guest: ${guest} - idle: %{idle}%

Check Specific Arguments

ArgumentDescription
n|procs-to-showNumber of processes to show when printing the top consuming processes
rangeSets time range to calculate average (default is 1m)
show-argsShow arguments when listing the top N processes

Attributes

Filter Keywords

these can be used in filters and thresholds (along with the default attributes):

AttributeDescription
totalSum of user,system,iowait,steal and guest in percent
userUser cpu utilization in percent
systemSystem cpu utilization in percent
iowaitIOWait cpu utilization in percent
stealSteal cpu utilization in percent
guestGuest cpu utilization in percent
idleIdle cpu utilization in percent