<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 3/10/2012 7:02 AM, Tech Support
wrote:<br>
</div>
<blockquote cite="mid:002001cda0e1$3feec1f0$bfcc45d0$@us"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (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:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal" style="text-autospace:none"><span
style="color:black">All;<o:p></o:p></span></p>
<p class="MsoNormal"
style="text-align:justify;text-autospace:none"><span
style="color:black"> I wrote a plugin to collect data for
a particular service. I invoke the plugin with whatever
parameter I want to return information on. In fact, it
collects information on about 30 different params at once,
then returns the data that I specified. For example,
./get_sysinfo -p param1 or ./get_sysinfo -p param2, etc. It
seems to me to be a waste of resources to call the same
script 30 times. Is it possible to call the plugin once and
return all the data (including the performance data) at the
same time? The benefit that I have calling the same script
30 different times is that Nagiosgraph creates a separate
graph for each parameter and I don't want to lose that
ability. Any insight at all would be greatly appreciated.
<o:p></o:p></span></p>
<p class="MsoNormal"
style="text-align:justify;text-autospace:none"><span
style="color:black">Thanks;<o:p></o:p></span></p>
<p class="MsoNormal"
style="text-align:justify;text-autospace:none"><span
style="color:black">John V.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<br>
</div>
</blockquote>
Yes you can pass all data including performance data back in one
call.<br>
Here's an example output from check_wmi_plus<br>
<br>
Plugin data:<br>
Overall Status - OK (Sample Period 300 sec) - Logical Drive
Name="C:" (OK) - _PercentIdleTime=99%, _PercentBusyTime=1%,
_PercentDiskTime=1%, _PercentDiskReadTime=0%,
_PercentDiskWriteTime=1%, _DiskReadBytesPersec=0B/sec,
_DiskReadsPersec=0/sec, _DiskWriteBytesPersec=51.6KB/sec,
_DiskWritesPersec=3/sec, CurrentDiskQueueLength=0,
_AvgDiskQueueLength=0.0, _AvgDiskReadQueueLength=0.0,
_AvgDiskWriteQueueLength=0.0<br>
<br>
Performance Data:<br>
'_PercentIdleTimeC:'=99; '_PercentBusyTimeC:'=1;
'_PercentDiskTimeC:'=1; '_PercentDiskReadTimeC:'=0;
'_PercentDiskWriteTimeC:'=1; '_DiskReadBytesPersecC:'=0;
'_DiskReadsPersecC:'=0; '_DiskWriteBytesPersecC:'=52838;
'_DiskWritesPersecC:'=3; 'CurrentDiskQueueLengthC:'=0;
'_AvgDiskQueueLengthC:'=0.0; '_AvgDiskReadQueueLengthC:'=0.0;
'_AvgDiskWriteQueueLengthC:'=0.0;<br>
<br>
You just need to make sure all the field names (for perf data) are
different. Something like PNP4Nagios will draw multiple graphs using
output like that.<br>
<br>
If you didn't like returning it all at once you could:<br>
- You could rewrite the plugin to be run on a cron schedule. When it
is run, collect all 30 bits of information and pass the data to
Nagios as passive results to 30 different services.<br>
- You could rewrite the plugin to check multiple parameters at once
eg 10 and then pass all 10 back to Nagios as an active plugin. Then
just call it 3 times (making it parameter driven to return group1
data, group2 data group3 data etc)<br>
<br>
<br>
<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>
</body>
</html>