Ubuntu 24.04
Zabbix 7.0.0
I've noticed some strangeness with external scripts.
I've been using Zabbix since the good old days of 1.6, so while I wouldn't consider myself a 'expert', I certainly will consider myself more than a 'user'.
In zabbix, I have an 'external item' setup.
check-ntp-status.sh[{HOST.IP}]
It returns either 0 (failure) or 1 (success)
The script has the following in it:
output=$(/usr/lib/zabbix/externalscripts/check_ntp_time -H $1)
if [[ "$output" == *"NTP OK"* ]] ; then
echo 1
else
echo 0
fi
From a root session, I can run the script and it executes fine. It takes a grand total of 6 seconds to execute.
If I modify /etc/passwd for "zabbix" from /usr/sbin/nologin to /bin/bash and then 'su zabbix' I have verified I can also execute this same script (in 8 seconds).
HOWEVER:
134516:20240606:194017.372 Failed to execute command "/usr/lib/zabbix/externalscripts/check-ntp-status.sh '10.70.5.100'": Timeout while executing a shell script.
I have verified I have the Timeout value set to 30 seconds in both zabbix_server.conf and also zabbix_agent.conf. I have restarted the server as well to ensure all settings changes are loaded and being used.
I for the life of me cannot figure out why this script is timing out. (I have other unrelated external scripts running on this box without issue, so I know the overall functionality is working as it should.
I'm assuming this is some sort of ENV or PERMS issue, but I dont know what it is.
I have this same exact setup running in prod (Server 20.04 / Zabbix 6.4) without issue.
Any ideas?
Zabbix 7.0.0
I've noticed some strangeness with external scripts.
I've been using Zabbix since the good old days of 1.6, so while I wouldn't consider myself a 'expert', I certainly will consider myself more than a 'user'.
In zabbix, I have an 'external item' setup.
check-ntp-status.sh[{HOST.IP}]
It returns either 0 (failure) or 1 (success)
The script has the following in it:
output=$(/usr/lib/zabbix/externalscripts/check_ntp_time -H $1)
if [[ "$output" == *"NTP OK"* ]] ; then
echo 1
else
echo 0
fi
From a root session, I can run the script and it executes fine. It takes a grand total of 6 seconds to execute.
If I modify /etc/passwd for "zabbix" from /usr/sbin/nologin to /bin/bash and then 'su zabbix' I have verified I can also execute this same script (in 8 seconds).
HOWEVER:
134516:20240606:194017.372 Failed to execute command "/usr/lib/zabbix/externalscripts/check-ntp-status.sh '10.70.5.100'": Timeout while executing a shell script.
I have verified I have the Timeout value set to 30 seconds in both zabbix_server.conf and also zabbix_agent.conf. I have restarted the server as well to ensure all settings changes are loaded and being used.
I for the life of me cannot figure out why this script is timing out. (I have other unrelated external scripts running on this box without issue, so I know the overall functionality is working as it should.
I'm assuming this is some sort of ENV or PERMS issue, but I dont know what it is.
I have this same exact setup running in prod (Server 20.04 / Zabbix 6.4) without issue.
Any ideas?

Comment