[nagios-plugins] Fix check_mysql.c client options from file (#1199)
awiddersheim <notifications-9UaJU3cA/F/[email protected]> Sat, 05 Oct 2013 08:05:09 -0700
| Newsgroups | gmane.network.nagios.plugins.devel |
|---|---|
| Message-ID | <nagios-plugins/nagios-plugins/pull/[email protected]> |
--===============0031479582172631558==
Content-Type: multipart/alternative;
boundary="--==_mimepart_52502aa588a2a_3b271131d38792fb";
charset=UTF-8
Content-Transfer-Encoding: 7bit
----==_mimepart_52502aa588a2a_3b271131d38792fb
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
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
----==_mimepart_52502aa588a2a_3b271131d38792fb
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p>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.</p>
<p>Here is an strace before this change:</p>
<p>stat("/etc/mysql/.cnf", 0x7fff7c4e6620) = -1 ENOENT (No such file or directory)<br>
stat("/etc/.cnf", 0x7fff7c4e6620) = -1 ENOENT (No such file or directory)<br>
stat("/root/..cnf", 0x7fff7c4e6620) = -1 ENOENT (No such file or directory)</p>
<p>Here is an strace after:</p>
<p>stat("/etc/mysql/my.cnf", 0x7fffea2dea40) = -1 ENOENT (No such file or directory)<br>
stat("/etc/my.cnf", {st_mode=S_IFREG|0644, st_size=1331, ...}) = 0<br>
open("/etc/my.cnf", O_RDONLY) = 3</p>
<p>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. </p>
<hr>
<h4>You can merge this Pull Request by running</h4>
<pre> git pull https://github.com/awiddersheim/nagios-plugins fix_check_mysql_config_file</pre>
<p>Or view, comment on, or merge it at:</p>
<p> <a href='https://github.com/nagios-plugins/nagios-plugins/pull/1199'>https://github.com/nagios-plugins/nagios-plugins/pull/1199</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Fix check_mysql.c client options from file</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/nagios-plugins/nagios-plugins/pull/1199/files#diff-0">plugins/check_mysql.c</a>
(6)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/nagios-plugins/nagios-plugins/pull/1199.patch'>https://github.com/nagios-plugins/nagios-plugins/pull/1199.patch</a></li>
<li><a href='https://github.com/nagios-plugins/nagios-plugins/pull/1199.diff'>https://github.com/nagios-plugins/nagios-plugins/pull/1199.diff</a></li>
</ul>
----==_mimepart_52502aa588a2a_3b271131d38792fb--
--===============0031479582172631558==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
--===============0031479582172631558==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________________
Nagios Plugin Development Mailing List Nagiosplug-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
--===============0031479582172631558==--