check_kernel_stats

Checks some metrics of the Linux kernel. Currently supports context switches, process creations and total number of threads.

Implementation

WindowsLinuxFreeBSDmacOS
✅

Argument Defaults

ArgumentDefault Value
warningthreads > 8000
criticalthreads > 10000
empty-state3 (UNKNOWN)
empty-syntax%(status) - No metrics found
top-syntax%(status) - %(list)
ok-syntax%(status) - %(list)
detail-syntax%(label) %(human)

Check Specific Arguments

ArgumentDescription
typeSelect metric type to show, can be: ctxt, processes or threads

Attributes

Filter Keywords

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

AttributeDescription
nameName of the metric
labelLabel of the metric
rateRate of this metric
currentCurrent raw value
humanHuman readable number

Examples

Default Check

check_kernel_stats
OK - Context Switches 29.2/s, Process Creations 12.7/s, Threads 2574 |'ctxt'=29.2/s 'processes'=12.7/s 'threads'=2574;8000;10000;0

Example using check_snclient and Naemon

Naemon Config

define command{
    command_name         check_snclient
    command_line         $USER1$/check_snclient -k -p 'your-password' -u 'https://$HOSTADDRESS$:8443' $ARG1$ $ARG2$
}

define service {
    host_name            testhost
    service_description  check_kernel_stats
    use                  generic-service
    check_command        check_snclient!check_kernel_stats!
}