We use cookies to ensure that we give you the best experience on our website. Visit our Privacy Policy to learn more. If you continue to use this site, we will assume that you are okay with it.

Your choices regarding cookies on this site.
Your preferences have been updated.
In order for the changes to take effect completely please clear your browser cookies and cache. Then reload the page.

Werk #7013: mk_mysql: Fixed detecting wrong MySQL instances

ComponentChecks & Agents
Titlemk_mysql: Fixed detecting wrong MySQL instances
Date2018-12-18 16:51:11
Checkmk EditionCheckmk Raw Edition (CRE)
Checkmk Version1.6.0b1,1.5.0p10
LevelTrivial Change
ClassBug Fix
CompatibilityCompatible - no manual interaction needed

On systems with mysqld running together with php-cgi using specific options on the command line (like it is done by Check_MK sites), it could happen that the mk_mysql agent plugin detects not existing MySQL instances which leads to UNKNOWN services in Check_MK.

Processes that lead to wrong discovered services look like this:

root 901 1 0 Dec10 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe mysql 1274 901 0 Dec10 ? 01:27:32 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 wiki 16937 32282 0 13:21 ? 00:00:00 /usr/bin/php5-cgi -d session.save_handler=files -d session.save_path=/omd/sites/wiki/tmp/php/session -d upload_tmp_dir=/omd/sites/wiki/tmp/php/upload -d soap.wsdl_cache_dir=/omd/sites/wiki/tmp/php/wsdl-cache -d safe_mode=Off -d mysql.default_socket=/omd/sites/wiki/tmp/run/mysqld/mysqld.sock intern 27074 32276 0 10:39 ? 00:00:00 /usr/bin/php5-cgi -d session.save_handler=files -d session.save_path=/omd/sites/intern/tmp/php/session -d upload_tmp_dir=/omd/sites/intern/tmp/php/upload -d soap.wsdl_cache_dir=/omd/sites/intern/tmp/php/wsdl-cache -d safe_mode=Off -d mysql.default_socket=/omd/sites/intern/tmp/run/mysqld/mysqld.sock wiki 29129 32282 0 10:46 ? 00:00:02 /usr/bin/php5-cgi -d session.save_handler=files -d session.save_path=/omd/sites/wiki/tmp/php/session -d upload_tmp_dir=/omd/sites/wiki/tmp/php/upload -d soap.wsdl_cache_dir=/omd/sites/wiki/tmp/php/wsdl-cache -d safe_mode=Off -d mysql.default_socket=/omd/sites/wiki/tmp/run/mysqld/mysqld.sock root 29561 26105 0 16:51 pts/0 00:00:00 grep mysqld wiki 30673 32282 0 09:00 ? 00:00:03 /usr/bin/php5-cgi -d session.save_handler=files -d session.save_path=/omd/sites/wiki/tmp/php/session -d upload_tmp_dir=/omd/sites/wiki/tmp/php/upload -d soap.wsdl_cache_dir=/omd/sites/wiki/tmp/php/wsdl-cache -d safe_mode=Off -d mysql.default_socket=/omd/sites/wiki/tmp/run/mysqld/mysqld.sock

Only the process 1274 should be detected as MySQL instance.