Ad Widget

Collapse

zabbix_get working: custom item not

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alnipper49
    Junior Member
    • Sep 2017
    • 1

    #1

    zabbix_get working: custom item not

    Hi all,

    My guess is that this is due to how the value is being returned by my script but after three days of pouring over forums and manuals I'm throwing in the towel and posting.

    The script is a powershell script on a Windows server. It's designed to tell me how old the most recent file it (it's a directory full of nightly mysqldumps). All timeouts have been set to way more than it takes to run manually

    Here is the script:
    Code:
    $test=New-TimeSpan -Start $(gci e:\database | sort LastWriteTime | select -last 1 |select -ExpandProperty LastWriteTime ) | %{ $_.TotalHours}
    Write-Output $test

    Here is the pertinent entry in my agent config:
    Code:
    UserParameter=backup.sosh,powershell -File "C:\Zabbix\scripts\backup-soshdb.ps1"
    I've confirmed that I can pull the information from the zabbix server using zabbix_get:
    Code:
    zabbix_get -s 10.222.222.25 -k "backup.sosh"
    6.21479828247222
    (this information is correct)

    This is the error that I'm getting with the key under the custom icon


    And finally this is what the item looks like


    Thanks to any help in advance. I'm truly tearing my hair out over this one.
  • allexpetrov
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2017
    • 361

    #2
    Hi alnipper49,
    i've spotted that you've defined user parameter backup.sosh , but in WebUI you use sosh.backup!

    Regards,
    Alex!

    Comment

    Working...