Closed sandrotosi closed 6 years ago
I did a quick test, if the host is ommited localhost is assumed and sudo is added if you are not already root: ./check_ipmi_sensor IPMI Status: Critical [Intrusion = Critical] | 'System Temp'=23.00 'CPU1 Vcore'=0.95 'CPU2 Vcore'=0.95 'CPU1 DIMM'=1.58 'CPU2 DIMM'=1.58 '+1.5V'=1.50 '+3.3V'=3.26 '+3.3VSB'=3.22 '+5V'=5.06 '+12V'=12.14 'VBAT'=3.19 'Fan5'=3645.00 'Fan6'=3645.00
Lines 549 - 554:
if(!(defined $ipmi_host) || ($ipmi_host eq 'localhost')){
if(!defined($no_sudo)){
# Only add sudo if not already root
@basecmd = ($> != 0 ? 'sudo' : (), $IPMICOMMAND);
}
}
Can you check if your plugin contains those lines, are you using the latest version from git?
it seems like it's working now, thanks and i'm closing this issue
Hello, when running the check without any argument, it's very unclear that you gotta pass the hostname (at least):
that error comes from
host
(likely called to resolve the hostname eventually passed via -H) but there's no cli args there.I'd say the situation should be correctly identified and either default to localhost if -H is missing or print the help message and exit
thanks, Sandro