Problem with Send_NSCA on Windows

ankit.mehrotra at tcs.com ankit.mehrotra at tcs.com
Thu Jan 24 07:28:55 CET 2008


Hi,

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.


Any mechanism for doing it will be helpfull. 
When I tried redirection through a file to the  SendNsca.exe, it gave me 
the message "0 packets Sent  to the Nagios Server". 

@ Anthony 
thanks for the Pointer to NC_Net. Its a good tool and seems to be doing 
more than I need for at the moment. 

Thanks 
Ankit






"Anthony Montibello" <amontibello at gmail.com> 
01/24/2008 06:26 AM

To
ankit.mehrotra at tcs.com
cc
"Nagios Users" <nagios-users at lists.sourceforge.net>
Subject
Re: [Nagios-users] Problem with Send_NSCA on Windows






Actually C# Does have echo,  try
System.Console.WriteLine("ECHO TO STANDARD IO");
you can also write to standard error 
and you can also redirect IO streams, 
 
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.
 
Using C# NC_Net can feed an IO into  Win32_Send_NSCA.exe
I also wrote my own version of SendNSCA in C# (internally in NC_NEt)
doing that is a bit too complicated to discuss, but to oversimpify things:
To reimplement SendNSCA just convert the Send_nsca.c into C#
FOr commiunicating with Win32SEnd_Nsca read up on running processes 
Asyncronous and Syncronously. (spelling may be off)
 
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.
IT is availible on sourceforge: http://sourceforge.net/projects/nc-net
 
TOny (Author of NC_Net)

On Jan 23, 2008 8:13 AM, <ankit.mehrotra at tcs.com> wrote:

Hi,

I am trying to monitor windows machines passively.
For the same, I am writing some code in C#.

The problem is, C# does not support anything like echo command(The way we
used to do it on Linux).
I have tried to redirect the output from a file to the send_nsca exe, but
to no avail.

Can you suggest some formats in which the information can be passed to the
send_nsca exe ?

Thanks
Ankit

=====-----=====-----=====
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




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when 
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null

ForwardSourceID:NT0001D2C6 
=====-----=====-----=====
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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080124/cc76c2a4/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list