Hi,
I am having issues with a UserParameter - the bash works - but in Zabbix, I am getting garbage back.
It seems to be an issue on Agent2 - for my old debian 6 hosts on the old agent - its working fine.
Here you can see that the bash works OK...

Here you can see what I get back in Zabbix....

The permissions on the script are fine - I even tried setting them to 777. Still the same issue persists. This happens on all my debian 10 hosts with agent2 on them.
I tried this as a straight UserParameter, like this:
But it produces the same result. This is why I tried moving it to a script in /usr/local/bin.
I would love some advice or insight here. Anything for me to check - I have struggled with this for days.
I am expecting to see only "Camera 1 is online" or "Camera 1 is offline" - nothing else. How can I trim this down? It should not be sending this to Zabbix, but it is. I am not even sure how it generates the garbage to begin with - as the script works without piping anything to stdout.
Any advice or tips appreciated.
I am having issues with a UserParameter - the bash works - but in Zabbix, I am getting garbage back.
It seems to be an issue on Agent2 - for my old debian 6 hosts on the old agent - its working fine.
Here you can see that the bash works OK...
Here you can see what I get back in Zabbix....
The permissions on the script are fine - I even tried setting them to 777. Still the same issue persists. This happens on all my debian 10 hosts with agent2 on them.
I tried this as a straight UserParameter, like this:
Code:
UserParameter=camara1.pingstatus,ping camara1 -q -c 1 -w 1 2>&1 >/dev/null; result=$?; if ! [[ $result > 0 ]]; then echo "Camera 1 is online"; else echo "Camera 1 is offline"; fi
I would love some advice or insight here. Anything for me to check - I have struggled with this for days.
I am expecting to see only "Camera 1 is online" or "Camera 1 is offline" - nothing else. How can I trim this down? It should not be sending this to Zabbix, but it is. I am not even sure how it generates the garbage to begin with - as the script works without piping anything to stdout.
Any advice or tips appreciated.
Seeing all the correct words, but in wrong order...and no bells ringing..
Comment