Custom load notification thresholds

Hello,

Ive gotten a job with no handoff or documentation, now i have to change alert notification thresholds in Icinga. I have little to no previous experience with Icinga/Nagios.

For our OracleDB i need to change the wload and cload values, after some digging i found the configuration files in:

zones.d/icinga/hosts.conf

This is the host that needs changing:


object Host "hostname" {
    import "Linux-AgentHost"

    display_name = "Displayname"
    address = "1.3.3.7"
    vars.Eqipement_Type = "Server"
    vars.Equipment_company = "600"
    vars.Importance_level = "10"
    vars.Operating_System = "Linux"
    vars.Server_type = "VM"
    vars["_override_servicevars"] += {
        Processes = {
            procs_critical = "1100"
            procs_warning = "1050"
        }
    }
}

Based on my current understanding this host inherited the thresholds from “Linux-AgentHost” template thats predefined in Icinga.

The plugin calls for this syntax:

check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15 [-n NUMBER_OF_PROCS]

Problem i have is that i dont know where to change this, host side or icinga side?
Can this be done somehow through Web GUI?

Thank you very much for any help.

Hi & welcome,

First, you need to find out where the corresponding service object is defined. From Icingaweb you can get the service name e.g. linux_cpuload. On the CLI of your icinga machine run icinga object list -n linux_cpuload and notice lines with declared and modified.

Then check this/these file(s) if it/they contain e.g. vars.load_cload1 = host.vars.<xyz>. If so, you can than add vars.<xyz> = to your host object(s).

Hello Roland,

Ive checked the declared and modified lines, they guide me to service_apply.conf and service_templates.conf

They contain these blocks of config at lines specified in object list respectively:

apply Service "CPU" {
    import "Linux-CPU"


    assign where "Linux-AgentHost" in host.templates

    import DirectorOverrideTemplate
template Service "Linux-CPU" {
    check_command = "load"
    check_interval = 30s
    command_endpoint = host_name

I cant find anything related to vars.load_cload1 = host.vars.XYZ.

Is it possible to somehow define this like some hosts have disk space or process count overrides defined?

 vars["_override_servicevars"] += {
        Processes = {
            procs_critical = "1100"
            procs_warning = "1050"

Thank you again.
Best regards,
Rok Znidarsic

I’d recommend to check your definition(s) for linux_procs and then adapt Linux-CPU accordingly.