(plugin) storage::emc::isilon::snmp - mode hardware fix power component filter (#4428)
This commit is contained in:
parent
97d7a8ba6d
commit
8a4e3be5a7
|
@ -27,7 +27,7 @@ my $mapping = {
|
|||
diskLogicalNumber => { oid => '.1.3.6.1.4.1.12124.2.52.1.2' },
|
||||
diskChassisNumber => { oid => '.1.3.6.1.4.1.12124.2.52.1.3' },
|
||||
diskDeviceName => { oid => '.1.3.6.1.4.1.12124.2.52.1.4' },
|
||||
diskStatus => { oid => '.1.3.6.1.4.1.12124.2.52.1.5' },
|
||||
diskStatus => { oid => '.1.3.6.1.4.1.12124.2.52.1.5' }
|
||||
};
|
||||
my $oid_diskEntry = '.1.3.6.1.4.1.12124.2.52.1';
|
||||
|
||||
|
@ -52,15 +52,20 @@ sub check {
|
|||
next if ($self->check_filter(section => 'disk', instance => $instance));
|
||||
$self->{components}->{disk}->{total}++;
|
||||
|
||||
$self->{output}->output_add(long_msg => sprintf("disk '%s' status is '%s' [instance = %s] [logical = %s] [chassis = %s]",
|
||||
$result->{diskDeviceName}, $result->{diskStatus}, $instance,
|
||||
$result->{diskLogicalNumber}, $result->{diskChassisNumber}
|
||||
));
|
||||
$self->{output}->output_add(
|
||||
long_msg => sprintf(
|
||||
"disk '%s' status is '%s' [instance: %s] [logical: %s] [chassis: %s]",
|
||||
$result->{diskDeviceName}, $result->{diskStatus}, $instance,
|
||||
$result->{diskLogicalNumber}, $result->{diskChassisNumber}
|
||||
)
|
||||
);
|
||||
|
||||
my $exit = $self->get_severity(section => 'disk', value => $result->{diskStatus});
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Disk '%s' status is '%s'", $result->{diskDeviceName}, $result->{diskStatus}));
|
||||
$self->{output}->output_add(
|
||||
severity => $exit,
|
||||
short_msg => sprintf("Disk '%s' status is '%s'", $result->{diskDeviceName}, $result->{diskStatus})
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,23 +52,30 @@ sub check {
|
|||
next if ($self->check_filter(section => 'fan', instance => $instance));
|
||||
$self->{components}->{fan}->{total}++;
|
||||
|
||||
$self->{output}->output_add(long_msg => sprintf("fan '%s' is %s rpm [instance = %s] [description = %s]",
|
||||
$result->{fanName}, $result->{fanSpeed}, $instance,
|
||||
$result->{fanDescription}));
|
||||
$self->{output}->output_add(
|
||||
long_msg => sprintf(
|
||||
"fan '%s' is %s rpm [instance = %s] [description = %s]",
|
||||
$result->{fanName}, $result->{fanSpeed}, $instance,
|
||||
$result->{fanDescription}
|
||||
)
|
||||
);
|
||||
|
||||
my ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'fan', instance => $instance, value => $result->{fanSpeed});
|
||||
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Fan '%s' is %s rpm", $result->{fanName}, $result->{fanSpeed}));
|
||||
$self->{output}->output_add(
|
||||
severity => $exit,
|
||||
short_msg => sprintf("Fan '%s' is %s rpm", $result->{fanName}, $result->{fanSpeed})
|
||||
);
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'speed', unit => 'rpm',
|
||||
nlabel => 'hardware.fan.speed.rpm',
|
||||
instances => $result->{fanName},
|
||||
value => $result->{fanSpeed},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ use warnings;
|
|||
my $mapping = {
|
||||
powerSensorName => { oid => '.1.3.6.1.4.1.12124.2.55.1.2' },
|
||||
powerSensorDescription => { oid => '.1.3.6.1.4.1.12124.2.55.1.3' },
|
||||
powerSensorValue => { oid => '.1.3.6.1.4.1.12124.2.55.1.4' },
|
||||
powerSensorValue => { oid => '.1.3.6.1.4.1.12124.2.55.1.4' }
|
||||
};
|
||||
|
||||
my $oid_powerSensorEntry = '.1.3.6.1.4.1.12124.2.55.1';
|
||||
|
@ -52,16 +52,23 @@ sub check {
|
|||
next if ($self->check_filter(section => 'power', instance => $instance));
|
||||
$self->{components}->{power}->{total}++;
|
||||
|
||||
$self->{output}->output_add(long_msg => sprintf("Power '%s' sensor is %s [instance = %s] [description = %s]",
|
||||
$result->{powerSensorName}, $result->{powerSensorValue}, $instance,
|
||||
$result->{powerSensorDescription}));
|
||||
$self->{output}->output_add(
|
||||
long_msg => sprintf(
|
||||
"power '%s' sensor is %s [instance: %s] [description: %s]",
|
||||
$result->{powerSensorName}, $result->{powerSensorValue}, $instance,
|
||||
$result->{powerSensorDescription}
|
||||
)
|
||||
);
|
||||
|
||||
my ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'fan', instance => $instance, value => $result->{powerSensorValue});
|
||||
my ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'power', instance => $instance, value => $result->{powerSensorValue});
|
||||
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Power '%s' sensor is %s (Volt or Amp)", $result->{powerSensorName}, $result->{powerSensorValue}));
|
||||
$self->{output}->output_add(
|
||||
severity => $exit,
|
||||
short_msg => sprintf("Power '%s' sensor is %s (Volt or Amp)", $result->{powerSensorName}, $result->{powerSensorValue})
|
||||
);
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'power',
|
||||
nlabel => 'hardware.power.sensor.count',
|
||||
|
|
|
@ -26,7 +26,7 @@ use warnings;
|
|||
my $mapping = {
|
||||
tempSensorName => { oid => '.1.3.6.1.4.1.12124.2.54.1.2' },
|
||||
tempSensorDescription => { oid => '.1.3.6.1.4.1.12124.2.54.1.3' },
|
||||
tempSensorValue => { oid => '.1.3.6.1.4.1.12124.2.54.1.4' },
|
||||
tempSensorValue => { oid => '.1.3.6.1.4.1.12124.2.54.1.4' }
|
||||
};
|
||||
|
||||
my $oid_tempSensorEntry = '.1.3.6.1.4.1.12124.2.54.1';
|
||||
|
@ -52,23 +52,30 @@ sub check {
|
|||
next if ($self->check_filter(section => 'temperature', instance => $instance));
|
||||
$self->{components}->{temperature}->{total}++;
|
||||
|
||||
$self->{output}->output_add(long_msg => sprintf("temperature '%s' is %s C [instance = %s] [description = %s]",
|
||||
$result->{tempSensorName}, $result->{tempSensorValue}, $instance,
|
||||
$result->{tempSensorDescription}));
|
||||
$self->{output}->output_add(
|
||||
long_msg => sprintf(
|
||||
"temperature '%s' is %s C [instance: %s] [description: %s]",
|
||||
$result->{tempSensorName}, $result->{tempSensorValue}, $instance,
|
||||
$result->{tempSensorDescription}
|
||||
)
|
||||
);
|
||||
|
||||
my ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $result->{tempSensorValue});
|
||||
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is %s C", $result->{tempSensorName}, $result->{tempSensorValue}));
|
||||
$self->{output}->output_add(
|
||||
severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is %s C", $result->{tempSensorName}, $result->{tempSensorValue})
|
||||
);
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temperature', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $result->{tempSensorName},
|
||||
value => $result->{tempSensorValue},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue