File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
plugins-scripts/Classes/Fortigate/Component Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ sub finish {
17
17
my ($self ) = @_ ;
18
18
$self -> {fgHwSensorEntAlarmStatus } ||= " false" ;
19
19
$self -> {fgHwSensorEntValue } = -1 if ! defined $self -> {fgHwSensorEntValue };
20
- if ($self -> {fgHwSensorEntValue } == -1 ) {
20
+ if ( $self -> {fgHwSensorEntValue } =~ / ^-1 $ / ) {
21
21
# empty, this case is handled in the default sensor class
22
22
} elsif ($self -> {fgHwSensorEntName } =~ / Fan/ ) {
23
23
bless $self , " Classes::Fortigate::Component::SensorSubsystem::Fan" ;
24
- } elsif ($self -> {fgHwSensorEntName } =~ / PS.*Status/ ) {
24
+ } elsif ($self -> {fgHwSensorEntName } =~ / PS.*Status|PSU .*|RPS / ) {
25
25
bless $self , " Classes::Fortigate::Component::SensorSubsystem::Powersupply" ;
26
26
} elsif ($self -> {fgHwSensorEntName } =~ / (LM75)|(Temp)|(^(TD|TR)\d +)|(DTS\d +)/ ) {
27
27
# thermal diode/resistor, dingsbums thermal sensor
@@ -37,7 +37,7 @@ $self->{UNKNOWN} = 1;
37
37
38
38
sub check {
39
39
my ($self ) = @_ ;
40
- if ($self -> {fgHwSensorEntValue } == -1 ) {
40
+ if ( $self -> {fgHwSensorEntValue } =~ / ^-1 $ / ) {
41
41
$self -> add_info(sprintf ' %s is not installed' ,
42
42
$self -> {fgHwSensorEntName });
43
43
return ;
You can’t perform that action at this time.
0 commit comments