Build precise queries to find exactly what you need
Press ESC to close
@car
Favorites0
Views
Projects0
This also works on our AMS2300s. Thanks for saving me some valuable time and effort. I had a couple of minor troubles, hopefully they'll help someone. Firstly, I had trouble because I assumed that our AMS' community string would be "public". D'oh. I found it under Storage Nav -> Arrays -> (array) -> Settings -> SNMP Agent ->Environment Settings Secondly, the script suffers a runtime failure when it attempts to report a failure: Use of uninitialized value in string eq at check_hds_ams line 191. which, unless I've misunderstood, appears to be a broken test in a home-rolled join() function. The following seems to be a fix: --- /tmp/check_hds_ams.pl 2010-12-14 14:39:30.000000000 +1300 +++ check_hds_ams 2010-12-14 19:11:29.000000000 +1300 @@ -186,9 +186,6 @@ } } # separate messages by commas to be human friendly - for my $err (@errs) { - $result .= $err; - $result .= ", " unless $errs[-1] eq $_; - } + $result .= join ", ", @errs; return $result; }
Reviewed 15 years ago