mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-24 06:05:17 +02:00
enhance hp msa2000 hardware
This commit is contained in:
parent
d9bcca44e5
commit
50f86ce62c
@ -20,38 +20,104 @@
|
|||||||
|
|
||||||
package snmp_standard::mode::hardwarefibrealliance;
|
package snmp_standard::mode::hardwarefibrealliance;
|
||||||
|
|
||||||
use base qw(centreon::plugins::mode);
|
use base qw(centreon::plugins::templates::hardware);
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
my %oids = (
|
sub set_system {
|
||||||
connUnitSensorName => '.1.3.6.1.3.94.1.8.1.3',
|
my ($self, %options) = @_;
|
||||||
connUnitSensorStatus => '.1.3.6.1.3.94.1.8.1.4',
|
|
||||||
connUnitSensorMessage => '.1.3.6.1.3.94.1.8.1.6',
|
|
||||||
connUnitSensorType => '.1.3.6.1.3.94.1.8.1.7',
|
|
||||||
connUnitSensorCharacteristic => '.1.3.6.1.3.94.1.8.1.8',
|
|
||||||
|
|
||||||
connUnitPortName => '.1.3.6.1.3.94.1.10.1.17',
|
$self->{regexp_threshold_overload_check_section_option} = '^(sensors|port)$';
|
||||||
connUnitPortStatus => '.1.3.6.1.3.94.1.10.1.7',
|
|
||||||
);
|
$self->{cb_hook2} = 'snmp_execute';
|
||||||
|
|
||||||
|
$self->{thresholds} = {
|
||||||
|
sensors => [
|
||||||
|
['unknown', 'UNKNOWN'],
|
||||||
|
['other', 'UNKNOWN'],
|
||||||
|
['warning', 'WARNING'],
|
||||||
|
['failed', 'CRITICAL'],
|
||||||
|
['ok', 'OK'],
|
||||||
|
],
|
||||||
|
port => [
|
||||||
|
['warning', 'WARNING'],
|
||||||
|
['failure', 'CRITICAL'],
|
||||||
|
['unused', 'OK'],
|
||||||
|
['initializing', 'OK'],
|
||||||
|
['ready', 'OK'],
|
||||||
|
['.*', 'UNKNOWN'],
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
$self->{components_path} = 'snmp_standard::mode::components';
|
||||||
|
$self->{components_module} = ['sensors', 'port'];
|
||||||
|
}
|
||||||
|
|
||||||
|
sub new {
|
||||||
|
my ($class, %options) = @_;
|
||||||
|
my $self = $class->SUPER::new(package => __PACKAGE__, %options,
|
||||||
|
no_absent => 1, no_performance => 1, no_load_components => 1, force_perfdata_new => 1);
|
||||||
|
bless $self, $class;
|
||||||
|
|
||||||
|
$self->{version} = '1.0';
|
||||||
|
$options{options}->add_options(arguments => {});
|
||||||
|
|
||||||
|
return $self;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub snmp_execute {
|
||||||
|
my ($self, %options) = @_;
|
||||||
|
|
||||||
|
$self->{snmp} = $options{snmp};
|
||||||
|
$self->{results} = $self->{snmp}->get_multiple_table(oids => $self->{request});
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
=head1 MODE
|
||||||
|
|
||||||
|
Check status of SAN Hardware (Following FibreAlliance MIB: MIB40)
|
||||||
|
http://www.emc.com/microsites/fibrealliance/index.htm
|
||||||
|
|
||||||
|
=over 8
|
||||||
|
|
||||||
|
=item B<--component>
|
||||||
|
|
||||||
|
Which component to check (Default: '.*').
|
||||||
|
Can be: 'sensors', 'port'.
|
||||||
|
|
||||||
|
=item B<--filter>
|
||||||
|
|
||||||
|
Exclude some parts (comma seperated list)
|
||||||
|
Can also exclude specific instance: --filter=sensors,1
|
||||||
|
|
||||||
|
=item B<--no-component>
|
||||||
|
|
||||||
|
Return an error if no compenents are checked.
|
||||||
|
If total (with skipped) is 0. (Default: 'critical' returns).
|
||||||
|
|
||||||
|
=item B<--threshold-overload>
|
||||||
|
|
||||||
|
Set to overload default threshold values (syntax: section,[instance,]status,regexp)
|
||||||
|
It used before default thresholds (order stays).
|
||||||
|
Example: --threshold-overload='sensors,CRITICAL,^(?!(ok)$)'
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
=cut
|
||||||
|
|
||||||
|
package snmp_standard::mode::components::sensors;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
my %map_sensor_status = (
|
my %map_sensor_status = (
|
||||||
1 => 'unknown',
|
1 => 'unknown', 2 => 'other',
|
||||||
2 => 'other',
|
3 => 'ok', 4 => 'warning',
|
||||||
3 => 'ok',
|
|
||||||
4 => 'warning',
|
|
||||||
5 => 'failed',
|
5 => 'failed',
|
||||||
);
|
);
|
||||||
|
|
||||||
my %map_port_status = (
|
|
||||||
1 => 'unknown', 2 => 'unused',
|
|
||||||
3 => 'ready', 4 => 'warning',
|
|
||||||
5 => 'failure', 6 => 'notparticipating',
|
|
||||||
7 => 'initializing', 8 => 'bypass',
|
|
||||||
9 => 'ols', 10 => 'other',
|
|
||||||
);
|
|
||||||
|
|
||||||
my %map_sensor_type = (
|
my %map_sensor_type = (
|
||||||
1 => 'unknown', 2 => 'other',
|
1 => 'unknown', 2 => 'other',
|
||||||
3 => 'battery', 4 => 'fan',
|
3 => 'battery', 4 => 'fan',
|
||||||
@ -66,259 +132,96 @@ my %map_sensor_chara = (
|
|||||||
8 => 'frequency', 9 => 'power', 10 => 'door',
|
8 => 'frequency', 9 => 'power', 10 => 'door',
|
||||||
);
|
);
|
||||||
|
|
||||||
my $thresholds = {
|
my $mapping = {
|
||||||
sensors => [
|
connUnitSensorName => { oid => '.1.3.6.1.3.94.1.8.1.3' },
|
||||||
['unknown', 'UNKNOWN'],
|
connUnitSensorStatus => { oid => '.1.3.6.1.3.94.1.8.1.4', map => \%map_sensor_status },
|
||||||
['other', 'UNKNOWN'],
|
connUnitSensorMessage => { oid => '.1.3.6.1.3.94.1.8.1.6' },
|
||||||
['warning', 'WARNING'],
|
connUnitSensorType => { oid => '.1.3.6.1.3.94.1.8.1.7', map => \%map_sensor_type },
|
||||||
['critical', 'CRITICAL'],
|
connUnitSensorCharacteristic => { oid => '.1.3.6.1.3.94.1.8.1.8', map => \%map_sensor_chara },
|
||||||
['ok', 'OK'],
|
|
||||||
],
|
|
||||||
port => [
|
|
||||||
['warning', 'WARNING'],
|
|
||||||
['failure', 'CRITICAL'],
|
|
||||||
['unused', 'OK'],
|
|
||||||
['initializing', 'OK'],
|
|
||||||
['ready', 'OK'],
|
|
||||||
['.*', 'UNKNOWN'],
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
|
my $oid_connUnitSensorEntry = '.1.3.6.1.3.94.1.8.1';
|
||||||
|
|
||||||
sub new {
|
sub load {
|
||||||
my ($class, %options) = @_;
|
|
||||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
|
||||||
bless $self, $class;
|
|
||||||
|
|
||||||
$self->{version} = '1.0';
|
|
||||||
$options{options}->add_options(arguments =>
|
|
||||||
{
|
|
||||||
"exclude:s" => { name => 'exclude' },
|
|
||||||
"component:s" => { name => 'component', default => 'all' },
|
|
||||||
"no-component:s" => { name => 'no_component' },
|
|
||||||
"threshold-overload:s@" => { name => 'threshold_overload' },
|
|
||||||
});
|
|
||||||
|
|
||||||
$self->{components} = {};
|
|
||||||
$self->{no_components} = undef;
|
|
||||||
|
|
||||||
return $self;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub check_options {
|
|
||||||
my ($self, %options) = @_;
|
|
||||||
$self->SUPER::init(%options);
|
|
||||||
|
|
||||||
if (defined($self->{option_results}->{no_component})) {
|
|
||||||
if ($self->{option_results}->{no_component} ne '') {
|
|
||||||
$self->{no_components} = $self->{option_results}->{no_component};
|
|
||||||
} else {
|
|
||||||
$self->{no_components} = 'critical';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$self->{overload_th} = {};
|
|
||||||
foreach my $val (@{$self->{option_results}->{threshold_overload}}) {
|
|
||||||
if ($val !~ /^(.*?),(.*?),(.*)$/) {
|
|
||||||
$self->{output}->add_option_msg(short_msg => "Wrong threshold-overload option '" . $val . "'.");
|
|
||||||
$self->{output}->option_exit();
|
|
||||||
}
|
|
||||||
my ($section, $status, $filter) = ($1, $2, $3);
|
|
||||||
if ($self->{output}->is_litteral_status(status => $status) == 0) {
|
|
||||||
$self->{output}->add_option_msg(short_msg => "Wrong threshold-overload status '" . $val . "'.");
|
|
||||||
$self->{output}->option_exit();
|
|
||||||
}
|
|
||||||
$self->{overload_th}->{$section} = [] if (!defined($self->{overload_th}->{$section}));
|
|
||||||
push @{$self->{overload_th}->{$section}}, {filter => $filter, status => $status};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub component {
|
|
||||||
my ($self, %options) = @_;
|
|
||||||
|
|
||||||
if ($self->{option_results}->{component} eq 'all') {
|
|
||||||
$self->check_sensors();
|
|
||||||
$self->check_port();
|
|
||||||
} elsif ($self->{option_results}->{component} eq 'sensors') {
|
|
||||||
$self->check_sensors();
|
|
||||||
} elsif ($self->{option_results}->{component} eq 'port') {
|
|
||||||
$self->check_port();
|
|
||||||
} else {
|
|
||||||
$self->{output}->add_option_msg(short_msg => "Wrong option. Cannot find component '" . $self->{option_results}->{component} . "'.");
|
|
||||||
$self->{output}->option_exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
my $total_components = 0;
|
|
||||||
my $display_by_component = '';
|
|
||||||
my $display_by_component_append = '';
|
|
||||||
foreach my $comp (sort(keys %{$self->{components}})) {
|
|
||||||
# Skipping short msg when no components
|
|
||||||
next if ($self->{components}->{$comp}->{total} == 0 && $self->{components}->{$comp}->{skip} == 0);
|
|
||||||
$total_components += $self->{components}->{$comp}->{total} + $self->{components}->{$comp}->{skip};
|
|
||||||
$display_by_component .= $display_by_component_append . $self->{components}->{$comp}->{total} . '/' . $self->{components}->{$comp}->{skip} . ' ' . $self->{components}->{$comp}->{name};
|
|
||||||
$display_by_component_append = ', ';
|
|
||||||
}
|
|
||||||
|
|
||||||
$self->{output}->output_add(severity => 'OK',
|
|
||||||
short_msg => sprintf("All %s components [%s] are ok.",
|
|
||||||
$total_components,
|
|
||||||
$display_by_component)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (defined($self->{option_results}->{no_component}) && $total_components == 0) {
|
|
||||||
$self->{output}->output_add(severity => $self->{no_components},
|
|
||||||
short_msg => 'No components are checked.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
sub run {
|
|
||||||
my ($self, %options) = @_;
|
|
||||||
$self->{snmp} = $options{snmp};
|
|
||||||
|
|
||||||
$self->{results} = $self->{snmp}->get_multiple_table(oids => [
|
|
||||||
{ oid => $oids{connUnitSensorName} },
|
|
||||||
{ oid => $oids{connUnitSensorStatus} },
|
|
||||||
{ oid => $oids{connUnitSensorMessage} },
|
|
||||||
{ oid => $oids{connUnitSensorType} },
|
|
||||||
{ oid => $oids{connUnitSensorCharacteristic} },
|
|
||||||
{ oid => $oids{connUnitPortName} },
|
|
||||||
{ oid => $oids{connUnitPortStatus} },
|
|
||||||
]);
|
|
||||||
$self->component();
|
|
||||||
|
|
||||||
$self->{output}->display();
|
|
||||||
$self->{output}->exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
sub check_exclude {
|
|
||||||
my ($self, %options) = @_;
|
|
||||||
|
|
||||||
if (defined($options{instance})) {
|
|
||||||
if (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} =~ /(^|\s|,)${options{section}}[^,]*#\Q$options{instance}\E#/) {
|
|
||||||
$self->{components}->{$options{section}}->{skip}++;
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section $options{instance} instance."));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
} elsif (defined($self->{option_results}->{exclude}) && $self->{option_results}->{exclude} =~ /(^|\s|,)$options{section}(\s|,|$)/) {
|
|
||||||
$self->{output}->output_add(long_msg => sprintf("Skipping $options{section} section."));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub get_severity {
|
|
||||||
my ($self, %options) = @_;
|
|
||||||
my $status = 'UNKNOWN'; # default
|
|
||||||
|
|
||||||
if (defined($self->{overload_th}->{$options{section}})) {
|
|
||||||
foreach (@{$self->{overload_th}->{$options{section}}}) {
|
|
||||||
if ($options{value} =~ /$_->{filter}/i) {
|
|
||||||
$status = $_->{status};
|
|
||||||
return $status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach (@{$thresholds->{$options{section}}}) {
|
|
||||||
if ($options{value} =~ /$$_[0]/i) {
|
|
||||||
$status = $$_[1];
|
|
||||||
return $status;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $status;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub check_sensors {
|
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => "Checking sensors");
|
push @{$self->{request}}, { oid => $oid_connUnitSensorEntry, start => $mapping->{connUnitSensorName}->{oid}, end => $mapping->{connUnitSensorCharacteristic}->{oid} };
|
||||||
|
}
|
||||||
|
|
||||||
|
sub check {
|
||||||
|
my ($self) = @_;
|
||||||
|
|
||||||
|
$self->{output}->output_add(long_msg => "checking sensors");
|
||||||
$self->{components}->{sensors} = {name => 'sensors', total => 0, skip => 0};
|
$self->{components}->{sensors} = {name => 'sensors', total => 0, skip => 0};
|
||||||
return if ($self->check_exclude(section => 'sensors'));
|
return if ($self->check_filter(section => 'sensors'));
|
||||||
|
|
||||||
foreach my $key ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oids{connUnitSensorName}}})) {
|
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_connUnitSensorEntry}})) {
|
||||||
$key =~ /^$oids{connUnitSensorName}\.(.*)/;
|
next if ($oid !~ /^$mapping->{connUnitSensorName}->{oid}\.(.*)$/);
|
||||||
my $instance = $1;
|
my $instance = $1;
|
||||||
my $name = $self->{results}->{ $oids{connUnitSensorName} }->{$key};
|
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_connUnitSensorEntry}, instance => $instance);
|
||||||
my $status = defined($self->{results}->{$oids{connUnitSensorStatus}}->{$oids{connUnitSensorStatus} . '.' . $instance}) ?
|
|
||||||
$self->{results}->{$oids{connUnitSensorStatus}}->{$oids{connUnitSensorStatus} . '.' . $instance} : 1;
|
|
||||||
my $msg = defined($self->{results}->{$oids{connUnitSensorMessage}}->{$oids{connUnitSensorMessage} . '.' . $instance}) ?
|
|
||||||
$self->{results}->{$oids{connUnitSensorMessage}}->{$oids{connUnitSensorMessage} . '.' . $instance} : 1;
|
|
||||||
my $type = defined($self->{results}->{$oids{connUnitSensorType}}->{$oids{connUnitSensorType} . '.' . $instance}) ?
|
|
||||||
$self->{results}->{$oids{connUnitSensorType}}->{$oids{connUnitSensorType} . '.' . $instance} : 1;
|
|
||||||
my $chara = defined($self->{results}->{$oids{connUnitSensorCharacteristic}}->{$oids{connUnitSensorCharacteristic} . '.' . $instance}) ?
|
|
||||||
$self->{results}->{$oids{connUnitSensorCharacteristic}}->{$oids{connUnitSensorCharacteristic} . '.' . $instance} : 1;
|
|
||||||
|
|
||||||
next if ($self->check_exclude(section => 'sensors', instance => $name));
|
next if ($self->check_filter(section => 'sensors', instance => $instance, name => $result->{connUnitSensorName}));
|
||||||
|
|
||||||
$self->{components}->{sensors}->{total}++;
|
$self->{components}->{sensors}->{total}++;
|
||||||
$self->{output}->output_add(long_msg => sprintf("Sensor '%s' status is %s [msg = %s] [type = %s] [chara = %s]",
|
$self->{output}->output_add(long_msg => sprintf(
|
||||||
$name, $map_sensor_status{$status}, $msg, $map_sensor_type{$type}, $map_sensor_chara{$chara}));
|
"sensor '%s' status is %s [msg = %s] [type = %s] [chara = %s]",
|
||||||
my $exit = $self->get_severity(section => 'sensors', value => $map_sensor_status{$status});
|
$result->{connUnitSensorName}, $result->{connUnitSensorStatus},
|
||||||
|
$result->{connUnitSensorMessage}, $result->{connUnitSensorType}, $result->{connUnitSensorCharacteristic})
|
||||||
|
);
|
||||||
|
my $exit = $self->get_severity(section => 'sensors', name => $result->{connUnitSensorName}, value => $result->{connUnitSensorStatus});
|
||||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(severity => $exit,
|
||||||
short_msg => "Sensor '" . $name . "' status is " . $map_sensor_status{$status});
|
short_msg => "Sensor '%s' status is %s", $result->{connUnitSensorName}, $result->{connUnitSensorStatus});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub check_port {
|
package snmp_standard::mode::components::port;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
my %map_port_status = (
|
||||||
|
1 => 'unknown', 2 => 'unused',
|
||||||
|
3 => 'ready', 4 => 'warning',
|
||||||
|
5 => 'failure', 6 => 'notparticipating',
|
||||||
|
7 => 'initializing', 8 => 'bypass',
|
||||||
|
9 => 'ols', 10 => 'other',
|
||||||
|
);
|
||||||
|
|
||||||
|
my $mapping_port = {
|
||||||
|
connUnitPortName => { oid => '.1.3.6.1.3.94.1.10.1.17' },
|
||||||
|
connUnitPortStatus => { oid => '.1.3.6.1.3.94.1.10.1.7', map => \%map_port_status },
|
||||||
|
};
|
||||||
|
|
||||||
|
sub load {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
|
||||||
$self->{output}->output_add(long_msg => "Checking ports");
|
push @{$self->{request}}, { oid => $mapping_port->{connUnitPortName}->{oid} }, { oid => $mapping_port->{connUnitPortStatus}->{oid} };
|
||||||
|
}
|
||||||
|
|
||||||
|
sub check {
|
||||||
|
my ($self) = @_;
|
||||||
|
|
||||||
|
$self->{output}->output_add(long_msg => "checking ports");
|
||||||
$self->{components}->{port} = {name => 'ports', total => 0, skip => 0};
|
$self->{components}->{port} = {name => 'ports', total => 0, skip => 0};
|
||||||
return if ($self->check_exclude(section => 'port'));
|
return if ($self->check_filter(section => 'port'));
|
||||||
|
|
||||||
foreach my $key ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oids{connUnitPortName}}})) {
|
|
||||||
$key =~ /^$oids{connUnitPortName}\.(.*)/;
|
foreach my $key ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{ $mapping_port->{connUnitPortName}->{oid} }})) {
|
||||||
|
$key =~ /^$mapping_port->{connUnitPortName}->{oid}\.(.*)/;
|
||||||
my $instance = $1;
|
my $instance = $1;
|
||||||
my $name = $self->{results}->{ $oids{connUnitPortName} }->{$key};
|
my $name = $self->{results}->{ $mapping_port->{connUnitPortName}->{oid} }->{$key};
|
||||||
my $status = defined($self->{results}->{$oids{connUnitPortStatus}}->{$oids{connUnitPortStatus} . '.' . $instance}) ?
|
my $result = $self->{snmp}->map_instance(mapping => $mapping_port, results => $self->{results}->{ $mapping_port->{connUnitPortStatus}->{oid} }, instance => $instance);
|
||||||
$self->{results}->{$oids{connUnitPortStatus}}->{$oids{connUnitPortStatus} . '.' . $instance} : 1;
|
|
||||||
|
|
||||||
next if ($self->check_exclude(section => 'port', instance => $name));
|
next if ($self->check_filter(section => 'port', instance => $instance, name => $name));
|
||||||
|
|
||||||
$self->{components}->{port}->{total}++;
|
$self->{components}->{port}->{total}++;
|
||||||
$self->{output}->output_add(long_msg => sprintf("Port '%s' status is %s",
|
$self->{output}->output_add(long_msg => sprintf("port '%s' status is %s",
|
||||||
$name, $map_port_status{$status}));
|
$name, $result->{connUnitPortStatus}));
|
||||||
my $exit = $self->get_severity(section => 'port', value => $map_port_status{$status});
|
my $exit = $self->get_severity(section => 'port', name => $name, value => $result->{connUnitPortStatus});
|
||||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||||
$self->{output}->output_add(severity => $exit,
|
$self->{output}->output_add(severity => $exit,
|
||||||
short_msg => "Port '" . $name . "' status is " . $map_port_status{$status});
|
short_msg => sprintf("Port '%s' status is %s", $name, $result->{connUnitPortStatus}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
|
||||||
|
|
||||||
__END__
|
|
||||||
|
|
||||||
=head1 MODE
|
|
||||||
|
|
||||||
Check status of SAN Hardware (Following FibreAlliance MIB: MIB40)
|
|
||||||
http://www.emc.com/microsites/fibrealliance/index.htm
|
|
||||||
|
|
||||||
=over 8
|
|
||||||
|
|
||||||
=item B<--component>
|
|
||||||
|
|
||||||
Which component to check (Default: 'all').
|
|
||||||
Can be: 'sensors', 'port'.
|
|
||||||
|
|
||||||
=item B<--exclude>
|
|
||||||
|
|
||||||
Exclude some parts (comma seperated list) (Example: --exclude=port)
|
|
||||||
Can also exclude specific instance: --exclude='sensors#Temperature Loc:upper-IOM A#'
|
|
||||||
|
|
||||||
=item B<--no-component>
|
|
||||||
|
|
||||||
Return an error if no compenents are checked.
|
|
||||||
If total (with skipped) is 0. (Default: 'critical' returns).
|
|
||||||
|
|
||||||
=item B<--threshold-overload>
|
|
||||||
|
|
||||||
Set to overload default threshold values (syntax: section,status,regexp)
|
|
||||||
It used before default thresholds (order stays).
|
|
||||||
Example: --threshold-overload='sensors,CRITICAL,^(?!(ok)$)'
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=cut
|
|
||||||
|
@ -31,10 +31,10 @@ sub new {
|
|||||||
|
|
||||||
$self->{version} = '1.0';
|
$self->{version} = '1.0';
|
||||||
%{$self->{modes}} = (
|
%{$self->{modes}} = (
|
||||||
'hardware' => 'snmp_standard::mode::hardwarefibrealliance',
|
'hardware' => 'snmp_standard::mode::hardwarefibrealliance',
|
||||||
'interfaces' => 'snmp_standard::mode::interfaces',
|
'interfaces' => 'snmp_standard::mode::interfaces',
|
||||||
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
|
||||||
);
|
);
|
||||||
|
|
||||||
return $self;
|
return $self;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user