Hello everyone
I'm having this weird problem with zabbix.
I'm trying to monitor this process in OPN Sense (20.7.5, FreeBSD 12.1)



My script: (don't judge, I'm really new to this) simply looks if the process is running and returns (in that case for testing purposes) random numbers for yes or no
if I simply run this from the terminal, it returns the correct value.
For zabbix integration I ceated a custom UserParameter in the agent conf
However:
When I try to monitor it in Zabbix however, it always displays the value for "not running".
So the script does get called from Zabbix, but somehow can't seem to execute it properly.
Any ideas what seems to be the problem here?
Thanks in advance
I'm having this weird problem with zabbix.
I'm trying to monitor this process in OPN Sense (20.7.5, FreeBSD 12.1)
My script: (don't judge, I'm really new to this) simply looks if the process is running and returns (in that case for testing purposes) random numbers for yes or no
Code:
#!/bin/sh . /etc/rc.subr nut=$(ps aux | grep "[U]PS" | cut -b 1,2,3,4) if [ "$nut" == uucp ]; then #process is running Return_value=5 else #process is not running Return_value=3 fi echo $Return_value
For zabbix integration I ceated a custom UserParameter in the agent conf
Code:
####### USER-DEFINED MONITORED PARAMETERS ####### UserParameter=system.nutservice, /home/mhk/nut_checker.sh
When I try to monitor it in Zabbix however, it always displays the value for "not running".
So the script does get called from Zabbix, but somehow can't seem to execute it properly.
Any ideas what seems to be the problem here?
Thanks in advance
Comment