<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="en-SE" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="SV">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="SV"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I come across this plugin when I wanted to move away from an old perl plugin we use today.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Overall this plugin is very good </span><span lang="EN-US" style="font-family:"Apple Color Emoji"">😊</span><span lang="EN-US"> But I think I found an issues with thresholds when I want to alert on a decreased value range.
It seems to trigger the alert just fine but warning and critical thresholds just display: 0.00000.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">If I change to an increased value range the threshold is displayed correctly.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I’m using check_mysql_query v2.2 (monitoring-plugins 2.2) on Ubuntu (downloaded with apt install )<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">See examples below:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Threshold show 0 if I want to alert when a value drops below x<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">check_mysql_query -d table1 -H localhost -u test -p test -q "select count(*) from test2;" -<b>w 10: -c 5:</b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">QUERY OK: select count(*) from test2;' returned 23.000000 | result=23.000000;<b><span style="color:red">0.000000;0.000000</span></b>;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">check_mysql_query -d table1 -H localhost -u test -p test -q "select count(*) from test2;" -<b>w 40: -c 5:</b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">QUERY WARNING: select count(*) from test2;' returned 23.000000 | result=23.000000;<b><span style="color:red">0.000000;0.000000</span></b>;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">check_mysql_query -d table1 -H localhost -u test -p test -q "select count(*) from test2;"
<b>-w 60: -c 50</b>:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">QUERY CRITICAL: select count(*) from test2;' returned 32.000000 | result=32.000000;<b><span style="color:red">0.000000;0.000000</span></b>;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thresholds works fine if I want to alert on a value goes above x<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">check_mysql_query -d table1 -H localhost -u test -p test -q "select count(*) from test2;" -<b>w :100: -c :150</b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">QUERY OK: select count(*) from test2;;' returned 54.000000 | result=54.000000;<b><span style="color:#00B050">100.000000;150.000000</span></b>;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">check_mysql_query -d table1 -H localhost -u test -p test -q "select count(*) from test2;"
<b>-w :40 -c :20</b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">QUERY CRITICAL: select count(*) from test2;' returned 32.000000 | result=32.000000;<b><span style="color:#00B050">40.000000;20.000000</span></b>;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Are you aware of this issue or do you know if the is it fixed in a later version? Or maybe I’m doing something wrong?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Kind Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Pär Segelström<o:p></o:p></span></p>
</div>
</body>
</html>