最好的方法是通过在命令中添加以下内容来重新定义该命令。conf.d目录中的conf文件。添加以下替换
<load>
使用您想要调用的命令:
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
}
$variablename$
然后是服务业。conf使用check命令的新名称。