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:
caronpe 2015-08-17 17:19:39 +02:00
parent ded291c760
commit 5fd60a5359
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ sub getdata {
my ($value);
#print $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";
$value = $1;
#print $value;
@ -60,4 +60,4 @@ sub getdata {
};
};
1;
1;