| 1 |
# |
| 2 |
# Copyright 2024 Centreon (http://www.centreon.com/) |
| 3 |
# |
| 4 |
# Centreon is a full-fledged industry-strength solution that meets |
| 5 |
# the needs in IT infrastructure and application monitoring for |
| 6 |
# service performance. |
| 7 |
# |
| 8 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 |
# you may not use this file except in compliance with the License. |
| 10 |
# You may obtain a copy of the License at |
| 11 |
# |
| 12 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 13 |
# |
| 14 |
# Unless required by applicable law or agreed to in writing, software |
| 15 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 16 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 |
# See the License for the specific language governing permissions and |
| 18 |
# limitations under the License. |
| 19 |
# |
| 20 |
|
| 21 |
package storage::emc::celerra::local::mode::components::datamover; |
| 22 |
|
| 23 |
use strict; |
| 24 |
use warnings; |
| 25 |
|
| 26 |
my %map_dm_status = ( |
| 27 |
0 => 'Reset (or unknown state)', |
| 28 |
1 => 'DOS boot phase, BIOS check, boot sequence', |
| 29 |
2 => 'SIB POST failures (that is, hardware failures)', |
| 30 |
3 => 'DART is loaded on Data Mover, DOS boot and execution of boot.bat, boot.cfg', |
| 31 |
4 => 'DART is ready on Data Mover, running, and MAC threads started', |
| 32 |
5 => 'DART is in contact with Control Station box monitor', |
| 33 |
7 => 'DART is in panic state', |
| 34 |
9 => 'DART reboot is pending or in halted state', |
| 35 |
13 => 'DART panicked and completed memory dump', |
| 36 |
14 => 'DM Misc problems', |
| 37 |
15 => 'Data Mover is flashing firmware. DART is flashing BIOS and/or POST firmware. Data Mover cannot be reset', |
| 38 |
17 => 'Data Mover Hardware fault detected', |
| 39 |
18 => 'DM Memory Test Failure. BIOS detected memory error', |
| 40 |
19 => 'DM POST Test Failure. General POST error', |
| 41 |
20 => 'DM POST NVRAM test failure. Invalid NVRAM content error', |
| 42 |
21 => 'DM POST invalid peer Data Mover type', |
| 43 |
22 => 'DM POST invalid Data Mover part number', |
| 44 |
23 => 'DM POST Fibre Channel test failure. Error in blade Fibre connection', |
| 45 |
24 => 'DM POST network test failure. Error in Ethernet controller', |
| 46 |
25 => 'DM T2NET Error. Unable to get blade reason code due to management switch problems', |
| 47 |
); |
| 48 |
|
| 49 |
sub load { } |
| 50 |
|
| 51 |
sub check { |
| 52 |
my ($self) = @_; |
| 53 |
|
| 54 |
$self->{output}->output_add(long_msg => "Checking data movers"); |
| 55 |
$self->{components}->{datamover} = {name => 'data movers', total => 0, skip => 0}; |
| 56 |
return if ($self->check_filter(section => 'datamover')); |
| 57 |
|
| 58 |
foreach my $line (split /\n/, $self->{stdout}) { |
| 59 |
next if ($line !~ /^\s*(\d+)\s+-\s+(\S+)/); |
| 60 |
my ($code, $instance) = ($1, $2); |
| 61 |
next if (!defined($map_dm_status{$code})); |
| 62 |
|
| 63 |
return if ($self->check_filter(section => 'datamover', instance => $instance)); |
| 64 |
|
| 65 |
$self->{components}->{datamover}->{total}++; |
| 66 |
$self->{output}->output_add(long_msg => sprintf("Data mover '%s' status is '%s'", |
| 67 |
$instance, $map_dm_status{$code})); |
| 68 |
my $exit = $self->get_severity(section => 'datamover', instance => $instance, value => $map_dm_status{$code}); |
| 69 |
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { |
| 70 |
$self->{output}->output_add(severity => $exit, |
| 71 |
short_msg => sprintf("Data mover '%s' status is '%s'", |
| 72 |
$instance, $map_dm_status{$code})); |
| 73 |
} |
| 74 |
} |
| 75 |
} |
| 76 |
|
| 77 |
1; |