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
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

Comment