Problem with Send_NSCA on Windows

Anthony Montibello amontibello at gmail.com
Fri Jan 25 01:49:03 CET 2008


There is also writing a BAT file to do it If you already have the file
created,
This is How I Test NSCA is running when my test server is up from the
command line.
something like:
send_nsca.exe <inputfile.txt
>From C#  Start a Process that is the Bat file,
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
I thought I mentioned this in the last message?

tony (Author of NC_Net)
On Jan 24, 2008 1:28 AM, <ankit.mehrotra at tcs.com> wrote:

>
>
> 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*<http://sourceforge.net/projects/nc-net>
>
> TOny (Author of NC_Net)
>
> On Jan 23, 2008 8:13 AM, <*ankit.mehrotra at tcs.com*<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/*<http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/>
> _______________________________________________
> Nagios-users mailing list*
> **Nagios-users at lists.sourceforge.net* <Nagios-users at lists.sourceforge.net>
> *
> **https://lists.sourceforge.net/lists/listinfo/nagios-users*<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/97acbf61/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