2016-02-13 23:39:09 +01:00
|
|
|
#
|
2020-01-06 15:19:23 +01:00
|
|
|
# Copyright 2020 Centreon (http://www.centreon.com/)
|
2016-02-13 23:39:09 +01:00
|
|
|
#
|
|
|
|
# Centreon is a full-fledged industry-strength solution that meets
|
|
|
|
# the needs in IT infrastructure and application monitoring for
|
|
|
|
# service performance.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
|
|
|
|
package hardware::server::dell::idrac::snmp::mode::components::resources;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Exporter;
|
|
|
|
|
|
|
|
our %map_state;
|
|
|
|
our %map_status;
|
|
|
|
our %map_probe_status;
|
2020-12-01 15:23:12 +01:00
|
|
|
our %map_enclosure_state;
|
2016-02-13 23:39:09 +01:00
|
|
|
our %map_amperage_type;
|
2016-02-14 21:10:08 +01:00
|
|
|
our %map_pdisk_state;
|
2019-01-10 11:32:56 +01:00
|
|
|
our %map_pdisk_smartstate;
|
2016-02-14 21:10:08 +01:00
|
|
|
our %map_vdisk_state;
|
2016-02-13 23:39:09 +01:00
|
|
|
|
|
|
|
our @ISA = qw(Exporter);
|
2020-12-01 15:23:12 +01:00
|
|
|
our @EXPORT_OK = qw(
|
|
|
|
%map_probe_status %map_enclosure_state %map_state
|
|
|
|
%map_status %map_amperage_type %map_pdisk_state
|
|
|
|
%map_pdisk_smartstate %map_vdisk_state
|
|
|
|
);
|
2019-01-10 11:32:56 +01:00
|
|
|
|
|
|
|
%map_pdisk_smartstate = (
|
|
|
|
0 => 'off',
|
2020-12-01 15:23:12 +01:00
|
|
|
1 => 'on'
|
2019-01-10 11:32:56 +01:00
|
|
|
);
|
2016-02-13 23:39:09 +01:00
|
|
|
|
|
|
|
%map_probe_status = (
|
|
|
|
1 => 'other',
|
|
|
|
2 => 'unknown',
|
|
|
|
3 => 'ok',
|
|
|
|
4 => 'nonCriticalUpper',
|
|
|
|
5 => 'criticalUpper',
|
|
|
|
6 => 'nonRecoverableUpper',
|
|
|
|
7 => 'nonCriticalLower',
|
|
|
|
8 => 'criticalLower',
|
|
|
|
9 => 'nonRecoverableLower',
|
2020-12-01 15:23:12 +01:00
|
|
|
10 => 'failed'
|
2016-02-13 23:39:09 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
%map_status = (
|
|
|
|
1 => 'other',
|
|
|
|
2 => 'unknown',
|
|
|
|
3 => 'ok',
|
|
|
|
4 => 'nonCritical',
|
|
|
|
5 => 'critical',
|
2020-12-01 15:23:12 +01:00
|
|
|
6 => 'nonRecoverable'
|
2016-02-13 23:39:09 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
%map_state = (
|
|
|
|
1 => 'unknown',
|
|
|
|
2 => 'enabled',
|
|
|
|
4 => 'notReady',
|
2020-12-01 15:23:12 +01:00
|
|
|
6 => 'enabledAndNotReady'
|
|
|
|
);
|
|
|
|
|
|
|
|
%map_enclosure_state = (
|
|
|
|
1 => 'unknown',
|
|
|
|
2 => 'ready',
|
|
|
|
3 => 'failed',
|
|
|
|
4 => 'missing',
|
|
|
|
5 => 'degraded'
|
2016-02-13 23:39:09 +01:00
|
|
|
);
|
|
|
|
|
2016-02-14 21:10:08 +01:00
|
|
|
%map_pdisk_state = (
|
|
|
|
1 => 'unknown',
|
|
|
|
2 => 'ready',
|
|
|
|
3 => 'online',
|
|
|
|
4 => 'foreign',
|
|
|
|
5 => 'offline',
|
|
|
|
6 => 'blocked',
|
|
|
|
7 => 'failed',
|
|
|
|
8 => 'non-raid',
|
|
|
|
9 => 'removed',
|
2020-12-01 15:23:12 +01:00
|
|
|
10 => 'readonly'
|
2016-02-14 21:10:08 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
%map_vdisk_state = (
|
|
|
|
1 => 'unknown',
|
|
|
|
2 => 'online',
|
|
|
|
3 => 'failed',
|
2020-12-01 15:23:12 +01:00
|
|
|
4 => 'degraded'
|
2016-02-14 21:10:08 +01:00
|
|
|
);
|
|
|
|
|
2016-02-13 23:39:09 +01:00
|
|
|
%map_amperage_type = (
|
|
|
|
1 => 'amperageProbeTypeIsOther',
|
|
|
|
2 => 'amperageProbeTypeIsUnknown',
|
|
|
|
3 => 'amperageProbeTypeIs1Point5Volt',
|
|
|
|
4 => 'amperageProbeTypeIs3Point3volt',
|
|
|
|
5 => 'amperageProbeTypeIs5Volt',
|
|
|
|
6 => 'amperageProbeTypeIsMinus5Volt',
|
|
|
|
7 => 'amperageProbeTypeIs12Volt',
|
|
|
|
8 => 'amperageProbeTypeIsMinus12Volt',
|
|
|
|
9 => 'amperageProbeTypeIsIO',
|
|
|
|
10 => 'amperageProbeTypeIsCore',
|
|
|
|
11 => 'amperageProbeTypeIsFLEA',
|
|
|
|
12 => 'amperageProbeTypeIsBattery',
|
|
|
|
13 => 'amperageProbeTypeIsTerminator',
|
|
|
|
14 => 'amperageProbeTypeIs2Point5Volt',
|
|
|
|
15 => 'amperageProbeTypeIsGTL',
|
|
|
|
16 => 'amperageProbeTypeIsDiscrete',
|
|
|
|
23 => 'amperageProbeTypeIsPowerSupplyAmps',
|
|
|
|
24 => 'amperageProbeTypeIsPowerSupplyWatts',
|
|
|
|
25 => 'amperageProbeTypeIsSystemAmps',
|
2020-12-01 15:23:12 +01:00
|
|
|
26 => 'amperageProbeTypeIsSystemWatts'
|
2016-02-13 23:39:09 +01:00
|
|
|
);
|
|
|
|
|
2019-01-10 11:32:56 +01:00
|
|
|
1;
|