<html xmlns:v="urn:schemas-microsoft-com:vml" 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=us-ascii"><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;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
color:black;}
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;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@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]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal style='text-align:justify'><span style='color:#1F497D'> Thanks for the info. This is good stuff, it really is. Someone else suggested using check_mk, and I read over all of the documentation on it. It seems like it was written to solve this very problem, but it seems to be somewhat involved. What I was originally thinking of was something simpler, maybe running the plugin out of CRON like you said, and passing all of the results back to the Nagios machine via send_nsca. Is it possible to send all of the data back at once using that method? Otherwise, sending data back to Nagios 30 times seems somewhat counter-productive to what I want to accomplish.<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='color:#1F497D'>Thanks;<o:p></o:p></span></p><p class=MsoNormal style='text-align:justify'><span style='color:#1F497D'>John<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> Matthew Jurgens [mailto:nagiosusers@edcint.co.nz] <br><b>Sent:</b> Sunday, October 07, 2012 6:21 PM<br><b>To:</b> Nagios Users List<br><b>Subject:</b> Re: [Nagios-users] Running the same plugin once vs. multiple times<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On 3/10/2012 7:02 AM, Tech Support wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='text-autospace:none'>All;<o:p></o:p></p><p class=MsoNormal style='text-align:justify;text-autospace:none'> 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></p><p class=MsoNormal style='text-align:justify;text-autospace:none'>Thanks;<o:p></o:p></p><p class=MsoNormal style='text-align:justify;text-autospace:none'>John V.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p></blockquote><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>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><o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>-- <br></span><span style='font-size:10.0pt;font-family:"Times New Roman","serif"'><a href="http://www.smartmon.com.au">Smartmon System Monitoring</a> <br><a href="http://www.smartmon.com.au">www.smartmon.com.au</a> </span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p></div></div></body></html>