Nagios plugin return bad values

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
SandraLewisFrin
Posts: 15
Joined: Fri Feb 18, 2022 4:44 am

Nagios plugin return bad values

Post by SandraLewisFrin »

I'm porting some nagios plugins to be executed using the by_ssh plugin, I don't have big issues, but I have this weird comportment with the check_load plugin, here is how I configured it:

object CheckCommand "check_load_by_ssh" {
import "by_ssh"
command = [ PluginDir + "/check_load" ]
arguments = {
"-w" = "$check_load_by_ssh_warn$"
"-c" = "$check_load_by_ssh_crit$"
"-r" = "$check_load_by_ssh_percpu$"
}
}
And in the services config:

apply Service "check_load_by_ssh" {
import "generic-service"
check_command = "check_load_by_ssh"
assign where (host.address || host.address6) && host.vars.os == "Linux" && host.name != NodeName
}
And in the host config I added:

vars.check_load_by_ssh_warn = "2,2,2"
vars.check_load_by_ssh_crit = "5,5,5"
vars.check_load_by_ssh_percpu = false
The plugin works fine, but never gives me the good load average.. It always return the values like when I use the -r argument. Executing it via cli I have this:

/usr/lib/nagios/plugins/check_by_ssh -H ... me[/color]gle shagle changed.[/url]

Thanks in advance guys :)
Locked