Ad Widget

Collapse

Zabbix - External Check Error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vshah
    Junior Member
    • Nov 2016
    • 7

    #1

    Zabbix - External Check Error

    I have created a script that uses REST APIs to gather some json data. I parse that data to get specific key-value pair and use zabbix_sender to push the data.
    I am able to successfully send the data when I execute the script, but the error comes in external check.

    I have created external check in my template to run the script every few minutes. It throws following error
    Received value [/usr/lib/zabbix/externalscripts/curl.sh: line 9: .json: Permission denied.jsonjq: error: Could not open file .json: No such file or directoryjq: error: Could not open file .json: No such file or directory


    The external check fails due to file permissions. External check executes the script which creates some temp file that stores json data and reads that file to parse the data using jq.

    I have also tried changing the file ownership to zabbix, but that doesn't help as well.

    Any help will be appreciated
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    i guess you script try to download something like .json but it fails because there are no write permissions in this directory and then the script fails, download the .json file to /tmp/.. its much easier
    Debian-User

    Sorry for my bad english

    Comment

    Working...