I have about 300 server behind firewalls and nat and it's impossible to
query check_mk agent and snmp from central check_mk server.

So i run check_mk agent locally on server and push it's output to check_mk
server.

On Sat, Oct 15, 2016 at 12:05 AM, ml...@libero.it <ml...@libero.it> wrote:

> Pavel,
>
> why are you using a powershell script? in my test environment I added some
> proliant dl servers running linux + hp agents and it worked out of the box.
> I did not try windows servers but it should be the same; I just selected
> agent+snmp
>
>
> ----Messaggio originale----
> Da: "Pavel Vaysman" <goa...@gmail.com>
> Data: 14/10/2016 17.27
> A: <checkmk-en@lists.mathias-kettner.de>
> Ogg: [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.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_1_78d8c5>$array_config_util
>    = "c:\hp\Bin\hpacucli.exe"
>    2.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_2_78d8c5>try
>    {
>    3.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_3_78d8c5>
>    $exec = & $array_config_util 'ctrl all show config'
>    4.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_4_78d8c5>#write-host
>    !!!!!!!!!!!!!!!!!!!!!
>    5.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_5_78d8c5>#Write-Output
>    $exec
>    6.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_6_78d8c5>
>    }
>    7.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_7_78d8c5>catch
>    {
>    8.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_8_78d8c5>Write-Host
>    "Problem checking array status)"
>    9.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_9_78d8c5>exit
>    3
>    10.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_10_78d8c5>
>    }
>    11.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_11_78d8c5>#
>    filter results for lines that talk about drives (physicaldrive,
>    logicaldrive)
>    12.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_12_78d8c5>#
>    and do not end with "OK":
>    13.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_13_78d8c5>$not_OK
>    = $exec | Where-Object { $_ -like "*drive*" } | Where-Object { $_ -notlike
>    "*OK*)" }
>    14.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_14_78d8c5>#write-output
>    "<<<>>>"
>    15.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_15_78d8c5>#write-output
>    $not_OK
>    16.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_16_78d8c5>if
>    ($not_OK.length -lt 1) {
>    17.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_17_78d8c5>Write-Host
>    "Array status appears OK"
>    18.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_18_78d8c5>exit
>    0
>    19.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_19_78d8c5>
>    }
>    20.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_20_78d8c5>Write-Host
>    "Array status not OK; please check RAID software"
>    21.
>    
> <https://monitoring-portal.org/index.php?thread/38275-windows-check-mk-agent-1-2-8p12-with-hpacucli-exe/#codeLine_21_78d8c5>exit
>    2
>
>
>
>
_______________________________________________
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

Reply via email to