<div>There is also writing a BAT file to do it If you already have the file created, </div>
<div>This is How I Test NSCA is running when my test server is up from the command line.</div>
<div>something like:</div>
<div>send_nsca.exe <inputfile.txt<br></div>
<div>From C#  Start a Process that is the Bat file, </div>
<div>once again, readup in the msdn library about processes and redirecting the standard INput  from consol  to a filestream. both consol and filestream inherit from iostream and thus are accepted as io for processes<br>
I thought I mentioned this in the last message?</div>
<div> </div>
<div>tony (Author of NC_Net)</div>
<div class="gmail_quote">On Jan 24, 2008 1:28 AM, <<a href="mailto:ankit.mehrotra@tcs.com">ankit.mehrotra@tcs.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br><font face="sans-serif" size="2"><br>Hi,</font> <br><br><font face="sans-serif" size="2">I know how to echo a message on the console ..... my problem is of redirecting the string to Send_Nsca.exe , which needs to be sent to the Nagios Server for the passive service check.</font> <br>
<br><br><font face="sans-serif" size="2">Any mechanism for doing it will be helpfull. </font><br><font face="sans-serif" size="2">When I tried redirection through a file to the  SendNsca.exe, it gave me the message "0 packets Sent  to the Nagios Server". </font><br>
<br><font face="sans-serif" size="2">@ Anthony </font><br><font face="sans-serif" size="2">thanks for the Pointer to NC_Net. Its a good tool and seems to be doing more than I need for at the moment. </font><br><br><font face="sans-serif" size="2">Thanks </font><br>
<font face="sans-serif" size="2">Ankit</font> <br><br><br><br><br><br>
<table width="100%">
<tbody>
<tr valign="top">
<td width="40%"><font face="sans-serif" size="1"><b>"Anthony Montibello" <<a href="mailto:amontibello@gmail.com" target="_blank">amontibello@gmail.com</a>></b> </font>
<p><font face="sans-serif" size="1">01/24/2008 06:26 AM</font> </p>
<td width="59%">
<table width="100%">
<tbody>
<tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">To</font></div>
<td><font face="sans-serif" size="1"><a href="mailto:ankit.mehrotra@tcs.com" target="_blank">ankit.mehrotra@tcs.com</a></font> 
<tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">cc</font></div>
<td><font face="sans-serif" size="1">"Nagios Users" <<a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a>></font> 
<tr valign="top">
<td>
<div align="right"><font face="sans-serif" size="1">Subject</font></div>
<td><font face="sans-serif" size="1">Re: [Nagios-users] Problem with Send_NSCA on Windows</font></td></td></tr></td></td></tr></td></td></tr></tbody></table><br>
<table>
<tbody>
<tr valign="top">
<td>
<td></td></td></tr></tbody></table><br></td>
<td><p></p></td></td></tr></tbody></table>
<div>
<div></div>
<div class="Wj3C7c"><br><br><br><font size="3">Actually C# Does have echo,  try</font> <br><font size="3">System.Console.WriteLine("ECHO TO STANDARD IO");</font> <br><font size="3">you can also write to standard error </font><br>
<font size="3">and you can also redirect IO streams, </font><br><font size="3"> </font> <br><font size="3">C# give pleanty of ways for doing this, since it is a full development language and the Dot NEt Framework offers pleanty of classes, Go to MSDN and read throught the Library. particullary the  IO,Console, and posibly the Process class depending on how you want to accomplish things.</font> <br>
<font size="3"> </font> <br><font size="3">Using C# NC_Net can feed an IO into  Win32_Send_NSCA.exe</font> <br><font size="3">I also wrote my own version of SendNSCA in C# (internally in NC_NEt)</font> <br><font size="3">doing that is a bit too complicated to discuss, but to oversimpify things:</font> <br>
<font size="3">To reimplement SendNSCA just convert the Send_nsca.c into C#</font> <br><font size="3">FOr commiunicating with Win32SEnd_Nsca read up on running processes Asyncronous and Syncronously. (spelling may be off)</font> <br>
<font size="3"> </font> <br><font size="3">Have you tried using NC_NEt it provides both Active and Passive checks in a single windows plugin client It also has the ability to run other Scripts loaded into its script folder.</font> <br>
<font size="3">IT is availible on sourceforge: </font><a href="http://sourceforge.net/projects/nc-net" target="_blank"><font color="blue" size="3"><u>http://sourceforge.net/projects/nc-net</u></font></a> <br><font size="3"> </font> <br>
<font size="3">TOny (Author of NC_Net)<br></font><br><font size="3">On Jan 23, 2008 8:13 AM, <</font><a href="mailto:ankit.mehrotra@tcs.com" target="_blank"><font color="blue" size="3"><u>ankit.mehrotra@tcs.com</u></font></a><font size="3">> wrote:</font> <br>
<font size="3"><br>Hi,<br><br>I am trying to monitor windows machines passively.<br>For the same, I am writing some code in C#.<br><br>The problem is, C# does not support anything like echo command(The way we<br>used to do it on Linux).<br>
I have tried to redirect the output from a file to the send_nsca exe, but<br>to no avail.<br><br>Can you suggest some formats in which the information can be passed to the<br>send_nsca exe ?<br><br>Thanks<br>Ankit<br><br>
=====-----=====-----=====<br>Notice: The information contained in this e-mail<br>message and/or attachments to it may contain<br>confidential or privileged information. If you are<br>not the intended recipient, any dissemination, use,<br>
review, distribution, printing or copying of the<br>information contained in this e-mail message<br>and/or attachments to it are strictly prohibited. If<br>you have received this communication in error,<br>please notify us by reply e-mail or telephone and<br>
immediately and permanently delete the message<br>and any attachments. Thank you<br><br><br><br><br>-------------------------------------------------------------------------<br>This SF.net email is sponsored by: Microsoft<br>
Defy all challenges. Microsoft(R) Visual Studio 2008.</font><font color="blue" size="3"><u><br></u></font><a href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target="_blank"><font color="blue" size="3"><u>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</u></font></a><font size="3"><br>
_______________________________________________<br>Nagios-users mailing list</font><font color="blue" size="3"><u><br></u></font><a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank"><font color="blue" size="3"><u>Nagios-users@lists.sourceforge.net</u></font></a><font color="blue" size="3"><u><br>
</u></font><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank"><font color="blue" size="3"><u>https://lists.sourceforge.net/lists/listinfo/nagios-users</u></font></a><font size="3"><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</font> <br><br></div></div><font face="sans-serif" color="white" size="1">ForwardSourceID:NT0001D2C6    </font> 
<div>
<div></div>
<div class="Wj3C7c"><br><pre>=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


</pre></div></div></blockquote></div><br>