Ad Widget

Collapse

Key works in zabbix_get but not in GUI

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 1berto
    Senior Member
    • Sep 2018
    • 182

    #1

    Key works in zabbix_get but not in GUI

    I have this key that grep a string from a specific file, and it works when i run it from the proxy, but when i create the item it returns an error 'In Lastest data'.


    grep "YYYY" /etc/ZZZZ.conf: Directory or file not found

    Code:
    zabbix_get -s XXXXXX -k system.run['grep "YYYY" /etc/ZZZZ.conf']
    YYYY="0"
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    When configuring the item remove the quotes from parameters, as otherwise bash thinks it's the whole command:
    Code:
    Key: system.run[grep "YYYY" /etc/ZZZZ.conf]
    Just an advise, when testing the key with zabbix_get put to single quotes the whole key, to avoid possible issues with white spaces:
    Code:
    zabbix_get -s XXXXXX -k 'system.run[grep "YYYY" /etc/ZZZZ.conf]'

    Comment

    Working...