| 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 hardware::server::dell::idrac::snmp::mode::components::resources; |
| 22 |
|
| 23 |
use strict; |
| 24 |
use warnings; |
| 25 |
use Exporter; |
| 26 |
|
| 27 |
our %map_state; |
| 28 |
our %map_status; |
| 29 |
our %map_probe_status; |
| 30 |
our %map_enclosure_state; |
| 31 |
our %map_amperage_type; |
| 32 |
our %map_pdisk_state; |
| 33 |
our %map_pdisk_smartstate; |
| 34 |
our %map_vdisk_state; |
| 35 |
|
| 36 |
our @ISA = qw(Exporter); |
| 37 |
our @EXPORT_OK = qw( |
| 38 |
%map_probe_status %map_enclosure_state %map_state |
| 39 |
%map_status %map_amperage_type %map_pdisk_state |
| 40 |
%map_pdisk_smartstate %map_vdisk_state |
| 41 |
); |
| 42 |
|
| 43 |
%map_pdisk_smartstate = ( |
| 44 |
0 => 'off', |
| 45 |
1 => 'on' |
| 46 |
); |
| 47 |
|
| 48 |
%map_probe_status = ( |
| 49 |
1 => 'other', |
| 50 |
2 => 'unknown', |
| 51 |
3 => 'ok', |
| 52 |
4 => 'nonCriticalUpper', |
| 53 |
5 => 'criticalUpper', |
| 54 |
6 => 'nonRecoverableUpper', |
| 55 |
7 => 'nonCriticalLower', |
| 56 |
8 => 'criticalLower', |
| 57 |
9 => 'nonRecoverableLower', |
| 58 |
10 => 'failed' |
| 59 |
); |
| 60 |
|
| 61 |
%map_status = ( |
| 62 |
1 => 'other', |
| 63 |
2 => 'unknown', |
| 64 |
3 => 'ok', |
| 65 |
4 => 'nonCritical', |
| 66 |
5 => 'critical', |
| 67 |
6 => 'nonRecoverable' |
| 68 |
); |
| 69 |
|
| 70 |
%map_state = ( |
| 71 |
1 => 'unknown', |
| 72 |
2 => 'enabled', |
| 73 |
4 => 'notReady', |
| 74 |
6 => 'enabledAndNotReady' |
| 75 |
); |
| 76 |
|
| 77 |
%map_enclosure_state = ( |
| 78 |
1 => 'unknown', |
| 79 |
2 => 'ready', |
| 80 |
3 => 'failed', |
| 81 |
4 => 'missing', |
| 82 |
5 => 'degraded' |
| 83 |
); |
| 84 |
|
| 85 |
%map_pdisk_state = ( |
| 86 |
1 => 'unknown', |
| 87 |
2 => 'ready', |
| 88 |
3 => 'online', |
| 89 |
4 => 'foreign', |
| 90 |
5 => 'offline', |
| 91 |
6 => 'blocked', |
| 92 |
7 => 'failed', |
| 93 |
8 => 'non-raid', |
| 94 |
9 => 'removed', |
| 95 |
10 => 'readonly' |
| 96 |
); |
| 97 |
|
| 98 |
%map_vdisk_state = ( |
| 99 |
1 => 'unknown', |
| 100 |
2 => 'online', |
| 101 |
3 => 'failed', |
| 102 |
4 => 'degraded' |
| 103 |
); |
| 104 |
|
| 105 |
%map_amperage_type = ( |
| 106 |
1 => 'amperageProbeTypeIsOther', |
| 107 |
2 => 'amperageProbeTypeIsUnknown', |
| 108 |
3 => 'amperageProbeTypeIs1Point5Volt', |
| 109 |
4 => 'amperageProbeTypeIs3Point3volt', |
| 110 |
5 => 'amperageProbeTypeIs5Volt', |
| 111 |
6 => 'amperageProbeTypeIsMinus5Volt', |
| 112 |
7 => 'amperageProbeTypeIs12Volt', |
| 113 |
8 => 'amperageProbeTypeIsMinus12Volt', |
| 114 |
9 => 'amperageProbeTypeIsIO', |
| 115 |
10 => 'amperageProbeTypeIsCore', |
| 116 |
11 => 'amperageProbeTypeIsFLEA', |
| 117 |
12 => 'amperageProbeTypeIsBattery', |
| 118 |
13 => 'amperageProbeTypeIsTerminator', |
| 119 |
14 => 'amperageProbeTypeIs2Point5Volt', |
| 120 |
15 => 'amperageProbeTypeIsGTL', |
| 121 |
16 => 'amperageProbeTypeIsDiscrete', |
| 122 |
23 => 'amperageProbeTypeIsPowerSupplyAmps', |
| 123 |
24 => 'amperageProbeTypeIsPowerSupplyWatts', |
| 124 |
25 => 'amperageProbeTypeIsSystemAmps', |
| 125 |
26 => 'amperageProbeTypeIsSystemWatts' |
| 126 |
); |
| 127 |
|
| 128 |
1; |