<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<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 name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-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;}
span.StileMessaggioDiPostaElettronica17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.StileMessaggioDiPostaElettronica18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</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=IT link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>None ?<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:Wingdings;color:#1F497D'>L</span><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Segoe UI","sans-serif"'>Da:</span></b><span style='font-size:10.0pt;font-family:"Segoe UI","sans-serif"'> Marco Borsani [mailto:m.borsani@it.net] <br><b>Inviato:</b> giovedì 10 marzo 2011 11:26<br><b>A:</b> 'Nagios Users List'<br><b>Oggetto:</b> [Nagios-users] how to send passive checks with send_nsca<br><b>Priorità:</b> Alta<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-GB>Hi all<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>I am reading many and many information regarding NSCA and send_nsca.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>I have configured a server with nsca demon running and a client within send_nsca.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>1)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>If I use this simple command, everything will go in the right way:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>/opt/nagios/bin/send_nsca -H SERVER_NAME -d ';' -c /opt/nagios/etc/send_nsca.cfg < /opt/nagios/etc/objects/passive.txt<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>The file “passive.txt” is something like this:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>host_cliente;CurrentLoad;0;TEST<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>In the server I have configured a passive_check that run the “check_dummy” command.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>2)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>I tried also a script that writes info into Nagios.cmd file like this :<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>#!/bin/sh<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>CLOCK=$(date +%s)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>HOST=$1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>STATUS=$2<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>OUTPUT=$3<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>SVC=$4<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>echo "[$CLOCK] PROCESS_SERVICE_CHECK_RESULT;$HOST;$SVC;$STATUS;$OUTPUT" >> /opt/nagios/var/rw/nagios.cmd<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>I see information in the client syslog and nagios.log file , but nothing arrives to the Nagios server … probably because nothing send them to it ! </span><span lang=EN-GB style='font-family:Wingdings'>J</span><span lang=EN-GB><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>3)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Moreover, how can I use the output from a REAL command that is running on my client (check_tcp , check_http, etc.) ?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>Perhaps I have to implement something more in the server (specific service, …) and/or in the client<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB>Please, any idea ?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB>regards<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:9.0pt;font-family:"Arial","sans-serif"'>Marco Borsani<o:p></o:p></span></p><p class=MsoNormal><b><span lang=EN-GB style='font-size:8.0pt;font-family:"Arial","sans-serif";color:#FFC000'>Unix and Monitoring Sysadmin<o:p></o:p></span></b></p><p class=MsoNormal><b><span lang=EN-GB style='font-size:8.0pt;font-family:"Arial","sans-serif";color:#FFC000'>Technical Operations Dpt.<o:p></o:p></span></b></p><p class=MsoNormal><span style='font-size:8.0pt;font-family:"Arial","sans-serif"'>tel: +39 010 4310115<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt;font-family:"Arial","sans-serif"'>fax: +39 02 30130311<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:8.0pt;font-family:"Arial","sans-serif"'>cell: +39 329 5953944<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:7.0pt;font-family:"Arial","sans-serif"'>ITnet Srl<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:7.0pt;font-family:"Arial","sans-serif"'>Società con socio unico<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:7.0pt;font-family:"Arial","sans-serif"'>Direzione e Coordinamento di WIND TELECOM S.p.A</span><span style='font-size:8.0pt;font-family:"Arial","sans-serif"'>.<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>