Skip to content

Zabbix: Required parameter $sql_parts follows optional parameter $table_alias

We are running our monitoring solution zabbix on an arch linux system. Arch linux tends to be "up to date" since it philosophie is "patch current code base, not legacy".

I've updated the monitoring system and with that, the php version jumped from 7.4.x to 8.0.x.

After that, a lot of "widgets" (boxes) in the zabbix frontend displayed me a lot of the following error.

Required parameter $sql_parts follows optional parameter $table_alias [zabbix.php:22 → require_once() → ZBase->run() → CSettingsHelper::getGlobal() → CSettingsHelper::loadParams() → API::getApiService() → CRegistryFactory->getObject() → CApiService->__construct() → CApiService->pk() → CApiService->getTableSchema() → CAutoloader->loadClass() → require() in include/classes/core/CAutoloader.php:77]

I've researched it and found that the error exists in the DB.php class. I've opened the issue Ticket ZBX-18984 and created the pull request 39 on the github source code. Hopefully, this fix will make it quickly into the code. I've added a git patch file to the issue. You can download and apply it on your system.

Migrate all branches and tags to bitbucket/github/gitlab/other remote endpoint

To have a real world scenario think about the task to migrate from an existing private gitweb repository to bitbucket, with all tags and branches.

The solution simple und just needs some time if the repository is a bigger one.

First, you have to create an empty and new repository at bitbucket.

cd <path you want to do this action>
#the next step is just for safety reasons
mkdir <repository_name>
git clone --mirror git@<your host>:<repository_name>.git .
git push --mirror git@bitbucket.org:<user_name>/<repository_name>

See how easy it is? Why not write a simple bash script?

#!/bin/bash
####
# @link https://artodeto.bazzline.net/archives/19519-Migrate-all-branches-and-tags-to-bitbucketgithubgitlabother-remote-endpoint.html
# @since 2017-11-06
# @author stev leibelt <artodeto@bazzline.net>
####

if [[ $# -lt 2 ]];
then
    echo ":: Invalid arguments provided."
    echo "   <command> \"<source repository url>\" \"<destination repository url>\""

    exit 1;
fi

DESTINATION_REPOSITORY_PATH="${2}"
SOURCE_REPOSITORY_PATH="${1}"
TEMPORARY_DIRECTORY="migrate_git_branch"

echo ":: Creating temporary directory."
mkdir "${TEMPORARY_DIRECTORY}"

cd "${TEMPORARY_DIRECTORY}"

echo ":: Cloning from source repository.".
git clone --mirror "${SOURCE_REPOSITORY_PATH}" .

echo ":: Pushing to destination repository."
git push --mirror "${DESTINATION_REPOSITORY_PATH}"

echo ":: You have to remove the following temporary directory if you want to."
echo "   "$(pwd)

web - server and client side remote code execution through a buffer overflow in all git versions before 2.7.1 (unpublished ᴄᴠᴇ-2016-2324 and ᴄᴠᴇ‑2016‑2315)

Someone has released an exploit to execute remote code on each machine (client or server) running git before version 2.7.1.
If you are working under "arch linux", you are pretty save with an "pacman -Syyu"
. I recommend reading the blog post called Remote Code Execution in all git versions (client + server) < 2.7.1: CVE-2016-2324, CVE-2016‑2315. But before reading, update your systems.

Meld, my favorite git mergetool

So, I was searching for a git merge tool.
I know, cool kids are using vimdiff and I use it too. But right now, the force is not strong enough for using this four window layout. Because of that, I was searching for an easy to use, free as in freedom, merge tool.
After asking a lot of questions to my favorite search engine, I found meld, or to be precise, the gitguys found it.
Currently, I am really happy with it. But for sure, I will keep on learning the force to master vimdiff in the future.