Running zabbix 3.4.15 on CentOS Linux 7.7.1908 with MySQL version 5.5.64-MariaDB
I was able to run this external script and three others like it for some time now and it always worked.
But a few days ago I noticed the script was not working. Here is what it says from the hosts triggers page
and in the zabbix server log
And yet I can run the command from the console of the server and I get
It returns the "5300" as expected and not "ssh: connect to host 10.37.37.4 port 2002: No route to host"
Any clues as to what changed would be great help in getting this script working again - it is extremely important to our monitoring of equipment changes that stop or reduce service to our customers.
I was able to run this external script and three others like it for some time now and it always worked.
Code:
#!/bin/sh
ubntUser=xxxx
ubntPass=xxxxx
sshPassBin=/usr/bin/sshpass
sshBin=/usr/bin/ssh
ubntHost=$1
ubntKey=$2
${sshPassBin} -p ${ubntPass} ${sshBin} -o StrictHostKeyChecking=no -l ${ubntUser} ${ubntHost} -p 2002 mca-status | grep "^${ubntKey}=" | cut -d= -f2
Cannot evaluate expression: "Cannot evaluate function "NKRL045U5_2:ubntStatus2002["{HOST.CONN}","wlanConnections"].last()": item is not supported.".
error reason for "NKRL045U5_2:ubntFreq2002["{HOST.CONN}","freq"]" changed: Value "ssh: connect to host 10.37.37.4 port 2002: No route to host" of type "string" is not suitable for value type "Numeric (unsigned)"
/usr/bin/sshpass -p AngryParrot191$ /usr/bin/ssh -o StrictHostKeyChecking=no -l admin 10.37.37.4 -p 2002 mca-status | grep "freq=" | cut -d= -f2
Warning: Permanently added '[10.37.37.4]:2002' (RSA) to the list of known hosts.
5300
Warning: Permanently added '[10.37.37.4]:2002' (RSA) to the list of known hosts.
5300
Any clues as to what changed would be great help in getting this script working again - it is extremely important to our monitoring of equipment changes that stop or reduce service to our customers.