<div>Hi,</div>
<div> </div>
<div>If your windows agent is NC_NEt, I know the reason why,</div>
<div>It has to do with delay between taking samples of the performance counter object before reporting it to back to check_nt</div>
<div> </div>
<div>To elaborate, most Performance monitor objects in windows takes a sample every one second then return the caalculated results to Performance monitor for graphing.  </div>
<div> </div>
<div>NC_NEt does not wait a full second for this to happen, and in the current inplementation it is actually too quick between samples and thus gives a result of 0.</div>
<div>I have experimented with different delay times (in Miliseconds) and found a good speed/accuraccy compromise that I will implement as adjustable variable in the configuration of the next release of NC_NEt. </div>
<div>Note: NC_NEt would report a -1 if the it could not locate the counter because of an error or spelling.</div>
<div>but a 0 means really 0 or the above mentioned bug.</div>
<div> </div>
<div>Just to defend NC_NEt.  in the past, this bug slipped through due to the Performance counter documentation of Dot NEt specifying just to call the get sample function again, and the documentation failed to mention any standards as to a minimum delay between requests.  Also most of NC_NEt testing in the past has been done offline of Nagios.  I am about to install nagios for testing, and hopefully would have that running by the time I get the updates into NC_Net.
</div>
<div> </div>
<div>As a workaround you may be able to retrieve the value you need through WMI</div>
<div> or by creating a custom performance counter that is of a different type but gets its value from the one that is mis-informing NC_NEt.</div>
<div> </div>
<div>NC_NEt is availible at sourceforge: <a href="http://sourceforge.net/projects/nc-net">http://sourceforge.net/projects/nc-net</a></div>
<div> </div>
<div>If it was a different Windows Client then I do not know the source of the reason but next generation of NC_Net should work more efficiently.</div>
<div>Thank you </div>
<div> </div>
<div>TOny   (Author of NC_NEt)<br> </div>
<div><span class="gmail_quote">On 12/5/06, <b class="gmail_sendername">M V Ajay (vMoksha)</b> <<a href="mailto:Ajay.MV@ucb-group.com">Ajay.MV@ucb-group.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<p><font face="Arial" size="2">Dear All:</font> </p>
<p><font face="Arial" size="2">I am having problem in monitoring a particular windows perfmon counter. All other counter gives proper results. I am using check_nt (check_nt (nagios-plugins 1.4.3) 1.39) with Nagios Agent running on WIndows NT 
4.0, Exchange 5.5</font></p>
<p><font face="Arial" size="2">Below is the Microsoft Exchange counter:</font> <br><font face="Arial" size="2">Object: MSExchangeMTA Connections</font> <br><font face="Arial" size="2">Counter: Queue Length</font> <br><font face="Arial" size="2">
Instance: (INTERNET MAIL CONNECTOR (MAILHOST001))</font> </p>
<p><font face="Arial" size="2">When I run the plugin command mannualy I get,</font> </p>
<p><font face="Arial" size="2">./check_nt -s nagiosagentpassword -H mailhost001 -v COUNTER -l "\MSExchangeMTA Connections(INTERNET MAIL CONNECTOR (MAILHOST001))\Queue Length"</font></p>
<p><font face="Arial" size="2">0.000000</font> </p>
<p><font face="Arial" size="2">and output is always 0.</font> <br><font face="Arial" size="2">But if I use windows perfmon, I get the proper results.</font> </p>
<p><font face="Arial" size="2">Any idea why this is not working?</font> </p>
<p><font face="Arial" size="2">Regards,</font> <br><font face="Arial" color="#0000ff" size="2">Ajay</font> </p><br>
<p><font face="Arial" size="2">--------------------------------------------------------- </font><br><font face="Arial" size="2">Legal Notice: This electronic mail and its attachments are intended solely for the person(s) to whom they are addressed and contain information which is confidential or otherwise protected from disclosure, except for the purpose for which they are intended. Dissemination, distribution, or reproduction by anyone other than the intended recipients is prohibited and may be illegal. If you are not an intended recipient, please immediately inform the sender and return the electronic mail and its attachments and destroy any copies which may be in your possession. UCB screens electronic mails for viruses but does not warrant that this electronic mail is free of any viruses. UCB accepts no liability for any damage caused by any virus transmitted by this electronic mail.
  
</font></p>
<p><font face="Arial" size="2">---------------------------------------------------------</font> </p></div><br>-------------------------------------------------------------------------<br>Take Surveys. Earn Cash. Influence the Future of IT
<br>Join SourceForge.net's Techsay panel and you'll get the chance to share your<br>opinions on IT & business topics through brief surveys - and earn cash<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV" target="_blank">
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</a><br><br>_______________________________________________<br>Nagios-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Nagios-users@lists.sourceforge.net">
Nagios-users@lists.sourceforge.net</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users
</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>::: Messages without supporting info will risk being sent to /dev/null<br><br></blockquote></div><br>