I am attempting to setup Temp monitors in my data rooms using Rasp Pi. I found a few articles that make it look easy enough, such as the following https://zabbix.tips/monitor-temperat...midity-zabbix/ but it is dated because with Bookworm and the newer 64 bit OS versions now require virtual environments. I even tried some of the steps from https://www.zabbix.com/forum/zabbix-...-python-script with no luck
I setup a /opt/TempMonitoring/ directory and assigned chmod -R ugo+rw permissions just to started
in the zabbix_agentd.conf I added the following
AllowKey=system.run[*]
UserParameter=dht.pull[*],/opt/TempMonitoring/venv/bin/python3 /opt/TempMonitoring/Adafruit_Python_DHT/examples/AdafruitDHT.py | awk -F[=*%] '{print $$$1}
In the Zabbix Server for the host I created a new Item with the key system.run[python3 /opt/TempMonitoring/Adafruit_Python_DHT/examples/AdafruitDHT.py 11 4] but when I test/run the Item python errors that it's looking for library files from /usr/local/lib/python3.9/dist-packages/Adafruit_DHT/


I added ( at least I thought it is correct) the zabbix user with privileged access as well as the includedir variable

I can run the the script from CLI python3 /opt/TempMonitoring/Adafruit_Python_DHT/examples/AdafruitDHT.py 11 4| awk -F[=*%] '{print $$$1}' without issue and without the sudo command

Clearly I am missing something but if anyone can help me out I would me most great full
I setup a /opt/TempMonitoring/ directory and assigned chmod -R ugo+rw permissions just to started
in the zabbix_agentd.conf I added the following
AllowKey=system.run[*]
UserParameter=dht.pull[*],/opt/TempMonitoring/venv/bin/python3 /opt/TempMonitoring/Adafruit_Python_DHT/examples/AdafruitDHT.py | awk -F[=*%] '{print $$$1}
In the Zabbix Server for the host I created a new Item with the key system.run[python3 /opt/TempMonitoring/Adafruit_Python_DHT/examples/AdafruitDHT.py 11 4] but when I test/run the Item python errors that it's looking for library files from /usr/local/lib/python3.9/dist-packages/Adafruit_DHT/
I added ( at least I thought it is correct) the zabbix user with privileged access as well as the includedir variable
I can run the the script from CLI python3 /opt/TempMonitoring/Adafruit_Python_DHT/examples/AdafruitDHT.py 11 4| awk -F[=*%] '{print $$$1}' without issue and without the sudo command
Clearly I am missing something but if anyone can help me out I would me most great full
Comment