<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
No need to write anything, just use this plugin which already does
all of that and heaps more<br>
<br>
<a class="moz-txt-link-abbreviated" href="http://www.edcint.co.nz/checkwmiplus">www.edcint.co.nz/checkwmiplus</a><br>
<br>
On 5/11/2011 1:18 AM, mazar wrote:
<blockquote cite="mid:4EB3F441.2040102@autistici.org" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hi list,<br>
<br>
I've put together a wrapper for the Disk Reads/sec and Disk
Writes/sec counters, my goal is to have an output as follow:<br>
<br>
./check_diskio_win.sh 1.1.1.1 C<br>
<br>
Disk Reads/sec is 5 ; Disk Writes/sec is 25<br>
<br>
I'm able to accomplish this via script, but when I give it to
nagios, as check_command the output (web interface) is as follow:<br>
<br>
<meta charset="utf-8">
<span class="Apple-style-span" style="color: rgb(0, 0, 0);
font-family: arial, serif; font-size: 11px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: 2; text-align:
-webkit-auto; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(219, 219, 219); display: inline
!important; float: none; ">Disk Reads/sec is : Disk Writes/sec
is </span><br>
<br>
what I do in the script is basically the below command and some
parsing (that works from shell script):<br>
<br>
check_nt -H $1 -v COUNTER -l "\\PhysicalDisk(0 $2:)\\Disk
Reads/sec","PhysicalDisk(0 $2:) Disk Reads/sec is %.f " <br>
<br>
<br>
any idea?<br>
<br>
Thx<br>
<br>
mazar<br>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
<a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/rsa-sfdev2dev1">http://p.sf.net/sfu/rsa-sfdev2dev1</a></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<p class="avgcert" color="#000000" align="left">No virus found in
this message.<br>
Checked by AVG - <a moz-do-not-send="true"
href="http://www.avg.com">www.avg.com</a><br>
Version: 10.0.1411 / Virus Database: 2092/3994 - Release Date:
11/03/11</p>
<br>
<div class="moz-signature">-- <br>
<font size="-1">
<a href="http://www.smartmon.com.au">Smartmon System
Monitoring</a>
<br>
<a href="http://www.smartmon.com.au">www.smartmon.com.au</a> </font></div>
</blockquote>
</body>
</html>