<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)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@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:12.0pt;
        font-family:"Times New Roman","serif";}
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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.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="2050" />
</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 lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">This example on a linux system should help ….<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">[root@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<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">1 data packet(s) sent to host successfull<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Jar Lyons<br>
Senior Software Engineer<br>
Tideworks Technology, Inc.<br>
(206) 344-3016 <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><img width="200" height="51" id="Picture_x0020_1" src="cid:image001.png@01CBE87A.F81EE6E0" alt="cid:image001.gif@01C8E1BC.4F6ACE00"></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";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"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> steve f [mailto:a31modela@hotmail.com]
<br>
<b>Sent:</b> Tuesday, March 22, 2011 10:09 AM<br>
<b>To:</b> nagios-users@lists.sourceforge.net<br>
<b>Subject:</b> [Nagios-users] A question on using send_nsca<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">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.<br>
<br>
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.<br>
<br>
My issue is, if I do this from the command line :<br>
<br>
/usr/local/nagios/bin/send_nsca -H NAGIOSSERVER -c /usr/local/nagios/etc/send_nsca.cfg < /tmp/test<br>
<br>
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 :<br>
<br>
HOSTNAME       TestMessage     0       This is a test message.<br>
<br>
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.<br>
<br>
Should I be able to do this some way like this ?<br>
<br>
/usr/local/nagios/bin/send_nsca -H NAGIOSSERVER -c /usr/local/nagios/etc/send_nsca.cfg  HOSTNAME  TestMessage 0 This is a test message<br>
<br>
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.<br>
<br>
Blaming this actually on my  scripting skills more than Nagios :)<br>
<br>
Can anyone shed some light / point me in a direction what I am doing wrong here?<br>
<br>
Thanks,<br>
<br>
Steve<o:p></o:p></span></p>
</div>
</body>
</html>