0

I'm having an issue locating where to change the thresholds for the check_load plugin on the Icinga2 master node.

1 Answer 1

1

The best way is to redefine that command by adding the following to your commands.conf file in your conf.d directory. Add the following replacing <load> with whatever you want to call the command:

object CheckCommand "<load>" {
    import "plugin-check-command"
    command = [ PluginDir + "/check_load" ]
    timeout = 1m
    arguments += {
        "-c" = {
            description = "Exit with CRITICAL status if load average exceed CLOADn; the load average format is the same used by 'uptime' and 'w'"
            value = "$load_cload1$,$load_cload5$,$load_cload15$"
        }
        "-r" = {
            description = "Divide the load averages by the number of CPUs (when possible)"
            set_if = "$load_percpu$"
        }
        "-w" = {
            description = "Exit with WARNING status if load average exceeds WLOADn"
            value = "$load_wload1$,$load_wload5$,$load_wload15$"
        }
    }
    vars.load_cload1 = 10
    vars.load_cload15 = 4
    vars.load_cload5 = 6
    vars.load_percpu = false
    vars.load_wload1 = 5
    vars.load_wload15 = 3
    vars.load_wload5 = 4
}

The values you'll want to change are vars.load_cload1-15 and vars.wload1-15 or set them to varibles that you can set in the service definition with $variablename$.

Then in services.conf use the new name of your check command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.