Hi guys,
So I've been trying to run a script I created on the Debian 12 machine hosting the Zabbix (ver 7.0.3) When using the test prompt in my Zabbix item I get "Unsupported key" returning, I am using the system. Run key. The script is named.sh and calls a python script which is in a venv.
Here are the steps I followed to attempt a proper running of my script :
I have tried different ways of writing the system.run[/path/to/the/bash] but could not find a working key. Also, i've tried using UserParameters like this : UserParameter=Notifs[*], /path/to/the/bash
Do you guys have any idea of what's wrong ? I am a beginner in Zabbix and I've tried looking into different workarounds but everything I've tried didn't work
I am sorry for my poor English. Thanks in advance for your answers.
So I've been trying to run a script I created on the Debian 12 machine hosting the Zabbix (ver 7.0.3) When using the test prompt in my Zabbix item I get "Unsupported key" returning, I am using the system. Run key. The script is named.sh and calls a python script which is in a venv.
Here are the steps I followed to attempt a proper running of my script :
- I started by creating a venv to install my py module (mysql-connector)
- I then created my Python script which is running properly when using python3 When trying to run the script from Zabbix GUI it can't find the mysql-connector module without activating it with source activate (the py script runs every hour so i couldn't do it).
- Next step was creating test.sh in my venv to run the py script : source activate python3 /path/to/the/.py/script
- In /etc/zabbix/zabbix_agentd.conf I allowed the specific keys : AllowKey=system.run[/path/to/the/bash] --> systemctl daemon-reload
- In Zabbix GUI I write in the key line system.run[/path/to/the/bash]
I have tried different ways of writing the system.run[/path/to/the/bash] but could not find a working key. Also, i've tried using UserParameters like this : UserParameter=Notifs[*], /path/to/the/bash
Do you guys have any idea of what's wrong ? I am a beginner in Zabbix and I've tried looking into different workarounds but everything I've tried didn't work
I am sorry for my poor English. Thanks in advance for your answers.