bug correction
the ITEMP information is write " 23 C" not " 23 C internal". correct the bug: #/usr/lib/nagios/plugins/Centreon/SNMP/centreon-plugins/centreon_plugins.pl --plugin=apps::apcupsd::local::plugin --mode=temperature Use of uninitialized value $valueok in numeric eq (==) at /usr/lib/nagios/plugins/Centreon/SNMP/centreon-plugins/apps/apcupsd/local/mode/libgetdata.pm line 52. CRITICAL: NO DATA FOUND |
This commit is contained in:
parent
ded291c760
commit
5fd60a5359
|
@ -41,7 +41,7 @@ sub getdata {
|
||||||
my ($value);
|
my ($value);
|
||||||
#print $stdout;
|
#print $stdout;
|
||||||
foreach (split(/\n/, $stdout)) {
|
foreach (split(/\n/, $stdout)) {
|
||||||
if (/^$searchpattern\s*:\s*(.*)\s(Percent Load Capacity|Percent|Minutes|Seconds|Volts|Hz|seconds|C Internal|F Internal)/i) {
|
if (/^$searchpattern\s*:\s*(.*)\s(Percent Load Capacity|Percent|Minutes|Seconds|Volts|Hz|seconds|C|F Internal)/i) {
|
||||||
$valueok = "1";
|
$valueok = "1";
|
||||||
$value = $1;
|
$value = $1;
|
||||||
#print $value;
|
#print $value;
|
||||||
|
@ -60,4 +60,4 @@ sub getdata {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
Loading…
Reference in New Issue