-
Notifications
You must be signed in to change notification settings - Fork 84
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
UNKNOWN Dynamic Smart Array P410i hpacucli #151
Comments
so, it's expected
what check_raid should do here? |
Well, that's true for the second controller in Slot3; but there is a working raid in Slot0 which is in state OK. So the question is how to behave in such a situation. My suggestion would be, that the aggregate state of all controllers should be returned. If there is nothing configured on a controller, then ... well... one could either ignore it, or have a command line switch (similar to the existing ones) where one can define the return value for such a case. Another option would be a command line switch for specifying which controller should be queried if multiple are found; so in this case one could restrict check_raid to slot=0 and ignore anything else as it isn't used. So in short, I'd expect an "OK" as result, question is how this can be achieved :-) Thanks for your time |
well. i see that your second controller is failing as controllers view it is ok, but in detailed view it gives error, so aggregate result of such is CRITICAL. however for your usecase one option is perhaps handle the very specific error |
once travis build finishes, you can try the snapshot build: |
First, thanks for the option but unfortunately it doesn't seem to work. I used the check_raid.pl from the above mentioned snapshot which reports its version as
Considering that I can find the following comment in the file itself, I'd guess this is the correct version:
So, I'm invoking the following command
Debug output gives:
Also changing slot=0 to slot=3 or even something else doesn't change the output in any way. Or am I using a wrong syntax here? At least that's what I've understood from your commit message / help screen. (BTW: should #139 be fixed with this build as well? If so, this doesn't seem to work either.) |
#139 problem was |
the commandline option seems correct:
[~/scm/nagios/check_raid (issue151)⚡] ➔ git diff
diff --git a/bin/check_raid.pl b/bin/check_raid.pl
index a7d5dfc..5e15f45 100755
--- a/bin/check_raid.pl
+++ b/bin/check_raid.pl
@@ -144,6 +144,9 @@ if (my $opts = $mp->opts->get('plugin-option')) {
}
}
+use Data::Dumper;
+print Dumper \%plugin_options; die;
+
my $mc = App::Monitoring::Plugin::CheckRaid->new(%plugin_options);
$App::Monitoring::Plugin::CheckRaid::Utils::debug = $mp->opts->debug; |
if with current master it still doesn't work. could you apply following patch to git checkout and run it: diff --git a/lib/App/Monitoring/Plugin/CheckRaid/Plugins/hpacucli.pm b/lib/App/Monitoring/Plugin/CheckRaid/Plugins/hpacucli.pm
index c113eb3..44b1109 100644
--- a/lib/App/Monitoring/Plugin/CheckRaid/Plugins/hpacucli.pm
+++ b/lib/App/Monitoring/Plugin/CheckRaid/Plugins/hpacucli.pm
@@ -40,7 +40,10 @@ sub sudo {
sub filter_targets {
my ($this, $targets) = @_;
+ use Data::Dumper;
my $cli_opts = $this->{options}{'hpacucli-target'};
+ print "Input Targets: ". Dumper $targets;
+ print "CLI: ". Dumper $cli_opts;
if (!$cli_opts) {
return $targets;
}
@@ -54,6 +57,7 @@ sub filter_targets {
$this->critical->message("Controller $filter not found");
}
}
+ print "Return Targets". Dumper \%res;
return \%res;
} |
ok, found bug with commandline options parsing. so just use git master or last snapshot build |
85423dd - the "Error: The specified device does not have any logical drives." are marked with --noraid=STATE. you can specify which slots to monitor same as #145 use check_raid.pl from snapshot release once build finishes, or git master i plan to make release soon anyway. |
Tested the latest snapshot (4.0.3-10-gf55300e) and can confirm that it is working and both my issues are fixed. Thank you very much for your effort. |
you can just use last 4.0.3 release too |
Help =( |
Hi there,
and another "unknown". Debug as follows:
Thanks!
The text was updated successfully, but these errors were encountered: