[Nagiosplug-devel] [nagios-plugins] Fix check_mysql.c client options from file (#1199)

awiddersheim notifications at github.com
Sat Oct 5 17:05:09 CEST 2013


If you don't specify a group or a file to read data from the plugin tries to read from several files that don't exist and no groups.

Here is an strace before this change:

stat("/etc/mysql/.cnf", 0x7fff7c4e6620) = -1 ENOENT (No such file or directory)
stat("/etc/.cnf", 0x7fff7c4e6620)       = -1 ENOENT (No such file or directory)
stat("/root/..cnf", 0x7fff7c4e6620)     = -1 ENOENT (No such file or directory)

Here is an strace after:

stat("/etc/mysql/my.cnf", 0x7fffea2dea40) = -1 ENOENT (No such file or directory)
stat("/etc/my.cnf", {st_mode=S_IFREG|0644, st_size=1331, ...}) = 0
open("/etc/my.cnf", O_RDONLY)           = 3

Even if you did specify a config file to read from bu no group was specified it is likely no group was used instead of using the default "client" group. All of this seems to be unintended behavior. 
You can merge this Pull Request by running:

  git pull https://github.com/awiddersheim/nagios-plugins fix_check_mysql_config_file

Or you can view, comment on it, or merge it online at:

  https://github.com/nagios-plugins/nagios-plugins/pull/1199

-- Commit Summary --

  * Fix check_mysql.c client options from file

-- File Changes --

    M plugins/check_mysql.c (6)

-- Patch Links --

https://github.com/nagios-plugins/nagios-plugins/pull/1199.patch
https://github.com/nagios-plugins/nagios-plugins/pull/1199.diff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nagios-plugins.org/archive/devel/attachments/20131005/d81d451a/attachment.html>


More information about the Devel mailing list