D
D
dflbrhekbn2019-10-18 13:49:07
linux
dflbrhekbn, 2019-10-18 13:49:07

How to run a script for external verification in Zabbix?

Installed zabbix server ready assembly. I found a python3 script on the Internet for external checking of free space on a Yandex disk.

-rw-r--r-x 1 zabbix zabbix 501 Oct 18 10:36 /usr/lib/zabbix/externalscripts/pyandex.py

if you run it
sudo -u zabbix python3 /usr/lib/zabbix/externalscripts/pyandex.py

then returns the value
если  sudo -u zabbix /usr/lib/zabbix/externalscripts/pyandex.py
, then in response
sudo: unable to execute /usr/lib/zabbix/externalscripts/pyandex.py: Permission denied

Hangup
In the web interface, it says "Permission denied"
If I understand correctly, then the external check is run from the "zabbix" user and the script must be .sh .
How to make this whole thing work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
paran0id, 2019-10-18
@dflbrhekbn

if sudo -u zabbix /usr/lib/zabbix/externalscripts/pyandex.py, then in response
sudo: unable to execute /usr/lib/zabbix/externalscripts/pyandex.py: Permission denied

chmod +x /usr/lib/zabbix/externalscripts/pyandex.py
check that it is running
sudo -u zabbix /usr/lib/zabbix/externalscripts/pyandex.py
if not, make sure there is a python shebang in the first line of the script

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question