Ad Widget

Collapse

UserParameter not supported, but works locally

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suntime
    Junior Member
    • Feb 2015
    • 2

    #1

    UserParameter not supported, but works locally

    Dear Zabbix Masters,

    I'm working on a new Zabbix deployment to monitor servers and network devices. Everything has been fine so far, but for the last couple of days I've been struggling with one particular problem and I can't seem to find the source of it.

    On a Windows SBS 2011 server there's a Zabbix agent running. I set up the following userparameter to monitor RAID status:

    in zabbix_agentd.conf:
    Code:
    Timeout=10
    UnsafeUserParameters=1
    UserParameter=raiddisks,c:\windows\system32\windowspowershell\v1.0\powershell.exe -nologo C:\zabbix\raiddisks.ps1
    in raiddisks.ps1:
    Code:
    omreport storage vdisk controller=0 | ?{$_ -match "^status"} | %{$status=1}{if($_ -notlike "*OK*"){$status=0}}{$status}
    When I test it locally on the machine itself, it returns a valid value:

    Code:
    C:\zabbix\agent>zabbix_agentd.exe -t raiddisks
    raiddisks                                     [t|1]
    However, when I add it as a new item in Zabbix, it goes to "Unsupported item key" every time I try. I tried adding it with different value settings ("Type of information"), all the same.

    If anyone of you has seen something like this before, I'd appreciate some help, as I can't seem to understand the problem here

    UPDATE

    Turns out, I made a mistake; it doesn't work locally either.
    However, I still can't find the root of the problem here. Running the same command from cmd gives me back value (1) but zabbix agent reports Unsupported item key, still.

    If any of you has an idea, I'd be happy to hear it Thank you!
    Last edited by suntime; 25-02-2015, 11:00.
  • suntime
    Junior Member
    • Feb 2015
    • 2

    #2
    I had to leave for about 2 hours. After I came back, everything is fine ("Refresh unsupported items" is already 30 sec). I don't know what happened, but it's working fine now, I'm seeing the RAID status in zabbix.

    Comment

    Working...