Nagios Exchange Nagios Exchange
  • Home
  • Directory
  • Library
  • Support
  • About

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up
  • Home
  • Directory
  • Library
  • Support
  • About
Plugins4391Themes and Skins12Add-ons741Documentation283Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
Nagios XI Tutorials Install Nagios XI In Under 10 Minutes Guide For Hyper-V
0.0 (0)
9.6K
RSS Feed
Newest Listings Updated Listings
Top Contributors
Julien DESMAREST (6)LAMY (6)Davide Lemma (4)deskwork_itunes142 (4)Claudio Kuenzler (2)
See More
Newest Contributors
Nitatemic (1)cjdepaul (1)ixs (1)messefreeze (2)apham (1)
See More

Copyright © 2009-2025 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home > Felix
F

Felix

@felix_h

User Stats

Member Since: March 3, 2014

Favorites0

Views

Projects0

No Projects Found
Powershell NRPE NSClient script for HP SmartArray check

complex; made simpler version

I also had trouble with this script on our servers. In particular, it returned a false "OK" status when I pulled a drive out of the array. I tried debugging it for a bit, but ended up getting frustrated and just rewrote it much shorter: ---- #### # # NAME: check_smartarray.ps1 # # ABOUT: Checks the output of HP's Array Configuration Utility for Smart Array # RAID controllers, and tries to detect any problems with array status. # # This was inspired by Christophe Robert's "Powershell NRPE NSClient # script for HP SmartArray check", found here: # http://localhost/directory/Plugins/Hardware/Server-Hardware/HP-(Compaq)/Powershell-NRPE-NSClient-script-for-HP-SmartArray-check/details # That one seemed a bit complicated, so I shortened it. # # AUTHOR: Felix Howe # # DISCLAIMER: I don't warrant this code as being suitable for anything; # use at your own risk. In writing it I represent only myself, not my employer. # #### $array_config_util = 'C:Program FilesCompaqHpacucliBinhpacucli.exe' try { $exec = & $array_config_util 'ctrl all show config' #Write-Output $exec } catch { Write-Host "Problem checking array status (hint: nagioscheck_smartarray.ps1)" exit 3 } # filter results for lines that talk about drives (physicaldrive, logicaldrive) # and do not end with "OK": $not_OK = $exec | Where-Object { $_ -like "*drive*" } | Where-Object { $_ -notlike "*OK)" } if ($not_OK.length -lt 2) { Write-Host "Array status appears OK" exit 0 } Write-Host "Array status not OK; please check (hint: nagioscheck_smartarray.ps1)" exit 2 ----

Reviewed 12 years ago

No Favorites Found

Copyright © 2009-2025 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile