1
package HP::Proliant::Component::AsrSubsystem::SNMP;
2
our @ISA = qw(HP::Proliant::Component::AsrSubsystem
3
HP::Proliant::Component::SNMP);
6
use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
12
runtime => $params{runtime},
13
rawdata => $params{rawdata},
16
extendedinfo => undef,
19
$self->overall_init(%params);
26
my $snmpwalk = $params{rawdata};
27
my $cpqHeAsrStatus = "1.3.6.1.4.1.232.6.2.5.1.0";
28
my $cpqHeAsrStatusValue = {
34
my $cpqHeAsrCondition = "1.3.6.1.4.1.232.6.2.5.17.0";
35
my $cpqHeAsrConditionValue = {
41
$self->{asrcondition} = lc SNMP::Utils::get_object_value(
42
$snmpwalk, $cpqHeAsrCondition,
43
$cpqHeAsrConditionValue);
44
$self->{asrstatus} = lc SNMP::Utils::get_object_value(
45
$snmpwalk, $cpqHeAsrStatus,
46
$cpqHeAsrStatusValue);
52
$self->blacklist('asr', '');
53
if ($self->{asrstatus} and $self->{asrstatus} eq "enabled") {
54
my $info = sprintf 'ASR overall condition is %s', $self->{asrcondition};
55
if ($self->{asrcondition} eq "degraded") {
56
$self->add_message(WARNING, $info);
57
} elsif ($self->{asrcondition} eq "failed") {
58
$self->add_message(CRITICAL, $info);
60
$self->add_info($info);
62
$self->add_info('This system does not have ASR.');