<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="https://uname.pingveno.net/blog/index.php/feed/rss2/xslt" ?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title># uname -a - Mot-clé - check_mysql_health</title>
    <link>https://uname.pingveno.net/blog/index.php/</link>
    <atom:link href="https://uname.pingveno.net/blog/index.php/feed/tag/check_mysql_health/rss2" rel="self" type="application/rss+xml" />
    <description>Le blog de uname.pingveno.net</description>
    <language>fr</language>
    <pubDate>Tue, 18 Aug 2026 13:46:21 +0200</pubDate>
    <copyright>Mathieu Pellegrin</copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>Dotclear</generator>
          <item>
        <title>Nagios : quick and dirty patch to enable (force) SSL on check_mysql_health</title>
        <link>https://uname.pingveno.net/blog/index.php/post/2015/06/06/Nagios-%3A-quick-and-dirty-patch-to-enable-%28force%29-SSL-on-check_mysql_health</link>
        <guid isPermaLink="false">urn:md5:3244ad7656fe67739208c0268a811102</guid>
        <pubDate>Sat, 06 Jun 2015 16:10:00 +0200</pubDate>
        <dc:creator>Mathieu</dc:creator>
                  <category>Hacks</category>
                          <category>check_mysql_health</category>
                  <category>debian</category>
                  <category>monitoring</category>
                  <category>mysql</category>
                  <category>nagios</category>
                  <category>server</category>
                <description>          &lt;p&gt;Sometimes you don&amp;#8217;t want to set up a VPN just to safely monitor your MySQL servers. Because SSL should be implemented in &lt;a href=&quot;https://exchange.nagios.org/directory/MySQL/check_mysql_health/details&quot;&gt;check_mysql_health&lt;/a&gt;, here is a quick and dirty patch for SSL connexion. I assume you already configured your MySQL server to use SSL if client wants to (or if user requires ssl).&lt;/p&gt;

&lt;p&gt;File &lt;strong&gt;/usr/lib/nagios/plugins/check_mysql_health&lt;/strong&gt; at line &lt;strong&gt;1863&lt;/strong&gt;, after the following block&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
    } else {
      $self-&amp;gt;{dsn} .= sprintf &quot;;host=%s&quot;, $self-&amp;gt;{hostname};
      $self-&amp;gt;{dsn} .= sprintf &quot;;port=%s&quot;, $self-&amp;gt;{port}
          unless $self-&amp;gt;{socket} || $self-&amp;gt;{hostname} eq 'localhost';
      $self-&amp;gt;{dsn} .= sprintf &quot;;mysql_socket=%s&quot;, $self-&amp;gt;{socket}
          if $self-&amp;gt;{socket};&lt;/pre&gt;

&lt;p&gt;Add these lines&amp;#160;:&lt;/p&gt;

&lt;pre&gt;
    $self-&amp;gt;{dsn} .= &quot;;mysql_ssl=1&quot;;
    $self-&amp;gt;{dsn} .= &quot;;mysql_ssl_client_key=/etc/ssl/mysql/client.key&quot;;
    $self-&amp;gt;{dsn} .= &quot;;mysql_ssl_client_cert=/etc/ssl/mysql/client.crt&quot;;
    $self-&amp;gt;{dsn} .= &quot;;mysql_ssl_ca_file=/etc/ssl/mysql/ca.crt&quot;;&lt;/pre&gt;

&lt;p&gt;Where &lt;strong&gt;/etc/ssl/mysql/client.key&lt;/strong&gt; is the path to client key, &lt;strong&gt;/etc/ssl/mysql/client.crt&lt;/strong&gt; the path to client certificate, and &lt;strong&gt;/etc/ssl/mysql/ca.crt&lt;/strong&gt; the path to the CA certificate.&lt;/p&gt;

&lt;p&gt;It should work, while there is still no &amp;#8220;SSL switch&amp;#8221; on that plugin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&amp;#160;: actually there is an undocumented param named &amp;#8220;&amp;#8212;mycnf&amp;#8221; which should allow you to enable SSL for client connection in a prettier way.&lt;/p&gt;</description>
        
              </item>
      </channel>
</rss>
