Ad Widget

Collapse

LLD on proxy fails: "Value should be a JSON object."

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BP_Vital
    Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Feb 2016
    • 42

    #1

    LLD on proxy fails: "Value should be a JSON object."

    Hello there.
    We have a custom LLD script running on Zabbix.3.2. Python script processes pre-generated CSV file, and prints out JSON for Zabbix LLD.
    Everything works fine when it is running on a server.
    However same script with same CSV fails on proxy.
    Discovery rule fails with error "Value should be a JSON object" when being run on a proxy, i.e. assigned to proxy monitored host.
    I can run it manually form proxy console, it prints out valid JSON (Validated on http://jsonlint.com).

    What am I missing?
  • nobodysu
    Member
    • Sep 2016
    • 84

    #2
    If you can run the script manually with success then the problem is in zabbix user environment variables, probably in PATH.
    Determine your proxy PATH first:
    Code:
    echo $PATH
    Then you can run script like this:
    Code:
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin script.py

    Comment

    • BP_Vital
      Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Feb 2016
      • 42

      #3
      Thank you! Tweaking path variables solved this problem.

      Comment

      Working...