Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spare drive is not recognized #34

Open
teanva opened this issue Jul 24, 2024 · 1 comment
Open

Spare drive is not recognized #34

teanva opened this issue Jul 24, 2024 · 1 comment

Comments

@teanva
Copy link

teanva commented Jul 24, 2024

SNMPv2-SMI::enterprises.232.3.2.5.1.1.6.0.0 = INTEGER: 2
SNMPv2-SMI::enterprises.232.3.2.5.1.1.6.0.1 = INTEGER: 2
SNMPv2-SMI::enterprises.232.3.2.5.1.1.6.0.2 = INTEGER: 2
SNMPv2-SMI::enterprises.232.3.2.5.1.1.6.0.3 = INTEGER: 2
SNMPv2-SMI::enterprises.232.3.2.5.1.1.6.0.4 = INTEGER: 2
SNMPv2-SMI::enterprises.232.3.2.5.1.1.6.0.5 = INTEGER: 2
SNMPv2-SMI::enterprises.232.3.2.5.1.1.6.0.6 = INTEGER: 10
SNMPv2-SMI::enterprises.232.3.2.5.1.1.6.0.7 = INTEGER: 2

./check_hpasm:
CRITICAL - physical drive 0:6 is value_10, System: 'proliant dl360 gen10'

./check_hpasm -v:
physical drive 0:0 is ok
physical drive 0:1 is ok
physical drive 0:2 is ok
physical drive 0:3 is ok
physical drive 0:4 is ok
physical drive 0:5 is ok
physical drive 0:6 is value_10
physical drive 0:7 is ok

Fix:

cpqDaPhyDrvStatusValue => {
          1 => "other",
          2 => "ok",
          3 => "failed",
          4 => "predictiveFailure",
          5 => "erasing",
          6 => "eraseDone",
          7 => "eraseQueued",
          8 => "ssdWearOut",
          9 => "notAuthenticated",
						
      },

sub check {
  my $self = shift;
  $self->blacklist('dapd', $self->{name});
  $self->add_info(
      sprintf "physical drive %s is %s",
          $self->{name}, $self->{cpqDaPhyDrvStatus});
  if ($self->{cpqDaPhyDrvStatus} ne 'ok') {
    $self->add_message(CRITICAL,
        sprintf "physical drive %s is %s",
            $self->{name}, $self->{cpqDaPhyDrvStatus});
  }
}

->

cpqDaPhyDrvStatusValue => {
          1 => "other",
          2 => "ok",
          3 => "failed",
          4 => "predictiveFailure",
          5 => "erasing",
          6 => "eraseDone",
          7 => "eraseQueued",
          8 => "ssdWearOut",
          9 => "notAuthenticated",
          10 => "spare",
      },


sub check {
  my $self = shift;
  $self->blacklist('dapd', $self->{name});
  $self->add_info(
      sprintf "physical drive %s is %s",
          $self->{name}, $self->{cpqDaPhyDrvStatus});
  if (($self->{cpqDaPhyDrvStatus} ne 'ok') && ($self->{cpqDaPhyDrvStatus} ne 'spare')) {
    $self->add_message(CRITICAL,
        sprintf "physical drive %s is %s",
            $self->{name}, $self->{cpqDaPhyDrvStatus});
  }
}

./check_hpasm:
OK - System: 'proliant dl360 gen10'

./check_hpasm -v:
physical drive 0:0 is ok
physical drive 0:1 is ok
physical drive 0:2 is ok
physical drive 0:3 is ok
physical drive 0:4 is ok
physical drive 0:5 is ok
physical drive 0:6 is spare
physical drive 0:7 is ok

@lausser
Copy link
Owner

lausser commented Jul 25, 2024

Hi, where did you get the information that 10 means spare? I was searching for a recent version of CPQIDA-MIB, but they all end at 9. If you could point me to a place where i can download the latest MIBs, then i can finally start to rewrite this plugin (it's very old and my other plugins have a structure which makes them way more easy to maintain)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants