Gitlab version check failed

Hi everyone,

we found a script to check the official gitlab version from It compares to our installed version and sends a trigger to our zabbix instance if an update is available and if it’s “asap”, et cetera…

But since a few days it’s not working anymore, our version check delivers an empty field.

This is the code we found on the internet:


echo “Connecting to Gitlab-URL $GITLAB_URL”
sleep 2
GITLAB=$(curl -s -H “PRIVATE-TOKEN: $API_TOKEN” $GITLAB_URL/api/v4/version | jq .version)
if [[ $GITLAB == “null” ]]; then
echo “Could not retrieve version from ‘$GITLAB_URL’. Is your API token correct?”
exit 1
echo “Currently installed Gitlab Version: $GITLAB”
sleep 2
ENCODED=$(echo ‘{“version”:’$GITLAB’}’ | base64 -i -)
echo “Encoded Base64-Format: $ENCODED”
sleep 2
VERSION=$(curl -s -H “Accept: image/png,image/svg+xml,image/;q=0.8,video/;q=0.8,/;q=0.5
Referer: $GITLAB_URL
DNT: 1
Accept-Language: en-us
Accept-Encoding: br, gzip, deflate
Connection: keep-alive”$ENCODED)
echo $VERSION | grep -q “up-to-date”
if [[ $? == 0 ]]; then
zabbix_sender -z zabbixhost -s $HOSTNAME -k status.gitlab.version -o 0
echo “Up to date”
echo $VERSION | grep -q “update available”
if [[ $? == 0 ]]; then
zabbix_sender -z zabbixhost -s $HOSTNAME -k status.gitlab.version -o 1
echo “Update available”
echo $VERSION | grep -q “update asap”
if [[ $? == 0 ]]; then
zabbix_sender -z zabbixhost -s $HOSTNAME -k status.gitlab.version -o 2
echo “Update asap”

And it failes here:

Connection: keep-alive"$ENCODED)

and doesn’t bring a result.

So at the moment we don’t have a solution to check our gitlab version against the official repo.

Can someone assist us here with this issue? Maybe there’s a better solution for this in general and we didn’t see it so far…

Thank you!