Ad Widget

Collapse

LLD rule using external check-type becomes unsupported with JSON as error message

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chojin
    Member
    Zabbix Certified Specialist
    • Jul 2011
    • 64

    #1

    LLD rule using external check-type becomes unsupported with JSON as error message

    I have created a script that queries a remote device but should be run by the zabbix server itself and returns valid LLD JSON. (checked with jsonlint)
    Using zabbix 3.4.2 I have then created a Discovery rule of the type "External Check" which calls this script.
    I expected that the output of the script would be interpreted by the discovery rule, however, the rule becomes "unsupported" and the error message is the output of the script: the JSON code, capped however to 2048 characters.
    Is 2048 characters a limitation of the external check method? or why doesn't this work ?
    Last edited by chojin; 24-11-2017, 11:34.
  • chojin
    Member
    Zabbix Certified Specialist
    • Jul 2011
    • 64

    #2
    nevermind.. I added an explicit "exit 0" to the script and now it works. I found the remark in the documentation that an external check would become unsupported if the exit code was not 0.

    Comment

    Working...