A question on using send_nsca

Jarlath Lyons Jarlath.Lyons at Tideworks.com
Tue Mar 22 18:44:31 CET 2011


No problem .... Btw (<insert shameless plug here>)...  if your client is written in java, you could use the NagiosAppender to automatically forward error log entries

http://www.novell.com/communities/node/4131/application-monitoring-made-easy-java-applications-using-nagios


Jar Lyons
Senior Software Engineer
Tideworks Technology, Inc.
(206) 344-3016

[cid:image001.gif at 01C8E1BC.4F6ACE00]

From: steve f [mailto:a31modela at hotmail.com]
Sent: Tuesday, March 22, 2011 10:34 AM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] A question on using send_nsca

Thanks very much Jar, that worked

regards,

Steve


________________________________
From: Jarlath.Lyons at Tideworks.com
To: nagios-users at lists.sourceforge.net
Date: Tue, 22 Mar 2011 17:22:05 +0000
Subject: Re: [Nagios-users] A question on using send_nsca
This example on a linux system should help ....

[root at jlyonslx test_harness]# /usr/bin/printf "HOST\tSERVICE\tCRITICAL\tMy Message ....\n"  | /usr/local/nagios/addons/nsca/send_nsca -H localhost -p 5667  -c ./nsca_send.cfg
1 data packet(s) sent to host successfull

Jar Lyons
Senior Software Engineer
Tideworks Technology, Inc.
(206) 344-3016

[cid:image001.gif at 01C8E1BC.4F6ACE00]

From: steve f [mailto:a31modela at hotmail.com]
Sent: Tuesday, March 22, 2011 10:09 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] A question on using send_nsca

I am trying to send a test job to my nagios server from a monitored client using send_nsca.  I am running suse linux 10 on both client & nagios server.

Currently, everything is working correctly from within nagios using send_nsca as I am set up as distributed environment.  I am now in the process of taking some in house built scripts & trying to send the results to nagios via send_nsca.

My issue is, if I do this from the command line :

/usr/local/nagios/bin/send_nsca -H NAGIOSSERVER -c /usr/local/nagios/etc/send_nsca.cfg < /tmp/test

I see the check come across to the nagios server ( granted it doesn't know what to do with it as the info is not set up in Nagios.  The /tmp/test file is nothing more than a tab delimited file as this :

HOSTNAME       TestMessage     0       This is a test message.

What I have been trying to do is run the same thing above, without the redirect to a discrete file. Every way I try it it fails and just shows me the help page for send_nsca.

Should I be able to do this some way like this ?

/usr/local/nagios/bin/send_nsca -H NAGIOSSERVER -c /usr/local/nagios/etc/send_nsca.cfg  HOSTNAME  TestMessage 0 This is a test message

It appears that the format of the message is incorrect.  I am not getting any tab in between the parameters.  I have tried using a \t  and [tab] but still not working.  Also tried doing an echo -e of the above with a xargs but not correct.

Blaming this actually on my  scripting skills more than Nagios :)

Can anyone shed some light / point me in a direction what I am doing wrong here?

Thanks,

Steve

------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________ 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110322/6cd1a3d9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 8228 bytes
Desc: image001.png
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110322/6cd1a3d9/attachment.png>
-------------- next part --------------
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
-------------- 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