~ubuntu-branches/ubuntu/trusty/nagios-plugins-contrib/trusty-proposed

« back to all changes in this revision

Viewing changes to check_hpasm/check_hpasm-4.5.2/plugins-scripts/HP/Proliant/Component/AsrSubsystem.pm

  • Committer: Package Import Robot
  • Author(s): Bernd Zeimetz
  • Date: 2013-05-21 22:11:50 UTC
  • mfrom: (5.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130521221150-k5bda5v5euvt7wg9
Tags: 6.20130521
* [e68c82e1] check_raid: do not run hpacucli if cciss_vol_status is available.
* [4a1c57e8] Also support tw-cli as additional name for the 3ware binary.
  Thanks to Dennis Hoppe
* [eb5e1c7c] Add /run/ to the check_libs ignore file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package HP::Proliant::Component::AsrSubsystem;
2
 
our @ISA = qw(HP::Proliant::Component);
3
 
 
4
 
use strict;
5
 
use constant { OK => 0, WARNING => 1, CRITICAL => 2, UNKNOWN => 3 };
6
 
 
7
 
sub new {
8
 
  my $class = shift;
9
 
  my %params = @_;
10
 
  my $self = {
11
 
    runtime => $params{runtime},
12
 
    rawdata => $params{rawdata},
13
 
    method => $params{method},
14
 
    condition => $params{condition},
15
 
    status => $params{status},
16
 
    temperatures => [],
17
 
    blacklisted => 0,
18
 
    info => undef,
19
 
    extendedinfo => undef,
20
 
  };
21
 
  bless $self, $class;
22
 
  if ($self->{method} eq 'snmp') {
23
 
    return HP::Proliant::Component::AsrSubsystem::SNMP->new(%params);
24
 
  } elsif ($self->{method} eq 'cli') {
25
 
    return HP::Proliant::Component::AsrSubsystem::CLI->new(%params);
26
 
  } else {
27
 
    die "unknown method";
28
 
  }
29
 
  return $self;
30
 
}
31
 
 
32
 
sub check {
33
 
  my $self = shift;
34
 
  my $errorfound = 0;
35
 
  $self->add_info('checking ASR');
36
 
  $self->overall_check(); 
37
 
}
38
 
 
39
 
sub dump {
40
 
  my $self = shift;
41
 
}
42
 
 
43
 
 
44
 
1;
45