<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
    I've noticed that if you use check_nt for check a COUNTER like this<br>
<br>
./check_nt -H HOST-v COUNTER -l "\\Memory\Pages/sec","%.1f pages/sec"
-w 200 -c 400<br>
17.0 pages/sec | '%.1f pages/sec'=17.000000%;200.000000;400.000000;<br>
<br>
    the returning metric has this %.1f that pollute the data and gets
showed in the graphics I generated, because perfparse storages it as
the metric value, but if a issue the same command without the %.1f, it
would return "No unit counter specified".<br>
    So, I've patched the check_nt so it runs without the %.1f and it
uses the description as metric. It returns as bellow, better in my
opinion.<br>
<br>
check_nt -H HOST -v COUNTER -l "\\Memory\Pages/sec","pages/sec" -w 200
-c 400<br>
pages/sec = 28.00 pages/sec |
pages/sec=28.000000pages/sec;200.000000;400.000000;<br>
<br>
it still works for normal % COUNTER checks, where it founds the % unit
in the description field.<br>
<br>
check_nt -H HOST -v COUNTER -l "\\Paging File(_Total)\% usage","paging
file used" -w 95 -c 98<br>
paging file used = 14.00 % | 'paging file
used'=14.000000%;95.000000;98.000000;<br>
<br>
<br>
    I am attaching the patch and I hope it does't break anything. I've
made some tests and everything seems to work fine.<br>
    I am attaching some graphics that generated by our capacity
planning module that show why I made this patch and the patch it self
made against nagios-plugins-1.4.2.<br>
<br>
    []s.<br>
<br>
<div class="moz-signature">-- <br>
<title>OpSign</title>
<font color="#3366ff">__________________________________________________</font><br>
<table border="0" cellpadding="0" cellspacing="0" width="350">
  <tbody>
    <tr>
      <td valign="top" width="130"> <font color="#000080"
 face="Helvetica, Arial, sans-serif" size="-1"><b>Alessandro Ren</b></font><br>
      </td>
      <td valign="top" width="220"> <font color="#000080"
 face="Helvetica, Arial, sans-serif" size="-1"><i><b>OpServices</b></i></font><br>
      <font color="#808080" face="Helvetica, Arial, sans-serif"
 size="-1"><i><b>Luciana de Abreu, 471 - Sala 403</b></i></font><br>
      <font color="#808080" face="Helvetica, Arial, sans-serif"
 size="-1"><i><b>Porto Alegre, RS - CEP 90570-060</b></i></font><br>
      </td>
    </tr>
  </tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="350">
  <tbody>
    <tr>
      <td valign="middle" width="180"> <font color="#000000"
 face="Wingdings" size="-3"><b>(</b></font><font color="#999999"
 face="Helvetica, Arial, sans-serif" size="-3">   phone 55(51)3061-3588</font><br>
      <font color="#000000" face="Wingdings" size="-3"><b>4</b></font><font
 color="#999999" face="Helvetica, Arial, sans-serif" size="-3">    fax 55(51)3061-3588</font><br>
      </td>
      <td valign="middle" width="200"> <font color="#000000"
 face="Wingdings" size="-3"><b>Q</b></font><font color="#999999"
 face="Helvetica, Arial, sans-serif" size="-3">   mobile 55(51)8151-8212</font><br>
      <font color="#000000" face="Wingdings" size="-3"><b>:</b></font><font
 color="#999999" face="Helvetica, Arial, sans-serif" size="-3">   email <a
 href="mailto:%22alessandro.ren@opservices.com.br%22">alessandro.ren@opservices.com.br</a></font><br>
      </td>
    </tr>
  </tbody>
</table>
<font color="#3366ff">__________________________________________________</font><br>
</div>
</body>
</html>