[Check_mk (english)] windows check_mk_agent 1.2.8p12 with hpacucli.exe

Hi guys,

i try to monitor hp raid with mrpe via check_mk_agent 1.2.8p12 with hpacucli.exe.
I have powershell script that run hpacucli.exe and parsing it’s output.
With check_mk_agent 1.2.6p16 it’s working perfect.
With new check_mk agent 1.2.8pX it’s return “ERROR: Cannot open console”
When i’m run check_mk agent 1.2.8pX with debug argument - it’s working.
Right now , workaround - write hpacucli.exe output to file via windows task scheduler and parse this txt file.

Is it bug or may be i did mistake somewhere?

Source Code

  1. $array_config_util = “c:\hp\Bin\hpacucli.exe”
  2. try {
  3. $exec = & $array_config_util ‘ctrl all show config’
  4. #write-host !!!
  5. #Write-Output $exec
  6. }
  7. catch {
  8. Write-Host “Problem checking array status)”
  9. exit 3
  10. }
  11. # filter results for lines that talk about drives (physicaldrive, logicaldrive)
  12. # and do not end with “OK”:
  13. $not_OK = $exec | Where-Object { $_ -like “drive” } | Where-Object { $_ -notlike “OK)” }
  14. #write-output “<<<>>>”
  15. #write-output $not_OK
  16. if ($not_OK.length -lt 1) {
  17. Write-Host “Array status appears OK”
  18. exit 0
  19. }
  20. Write-Host “Array status not OK; please check RAID software”
  21. exit 2

and now without html formatting…

Hi guys,

i try to monitor hp raid with mrpe via check_mk_agent 1.2.8p12 with hpacucli.exe.

I have powershell script that run hpacucli.exe and parsing it’s output.

With check_mk_agent 1.2.6p16 it’s working perfect.

With new check_mk agent 1.2.8pX it’s return “ERROR: Cannot open console”

When i’m run check_mk agent 1.2.8pX with debug argument - it’s working.

Right now , workaround - write hpacucli.exe output to file via windows task scheduler and parse this txt file.

Is it bug or may be i did mistake somewhere?

Source Code

$array_config_util = “c:\hp\Bin\hpacucli.exe”

try {

$exec = & $array_config_util ‘ctrl all show config’

#write-host !!!

#Write-Output $exec

}

catch {

Write-Host “Problem checking array status)”

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)” }

#write-output “<<<>>>”

#write-output $not_OK

if ($not_OK.length -lt 1) {

Write-Host “Array status appears OK”

exit 0

}

Write-Host “Array status not OK; please check RAID software”

exit 2