<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)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Angsana New";
        panose-1:2 2 6 3 5 4 5 2 3 4;}
@font-face
        {font-family:"Cordia New";
        panose-1:2 11 3 4 2 2 2 2 2 4;}
@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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</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=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='color:#1F497D'>The short answer is yes,  the
service description you configure on the client nsca message needs to match
that of the service description on your nagios server.   If you want to migrate
to a passive check you need to disable active checks and enable passive ones. 
You can leave the check command in place and incorporate freshness checks to
force an active check if the passive fail.  For me I don’t want to do active if
passive fail.  I would rather cut a ticket “service stale”.    The nagios doc
clearly shows how to configure passive service checks so give it a read.  <o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>So you need “my_cpu_check” to be
a service description so nagios knows what to match that incoming nsca message
to.  <o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Ash<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 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"'> Mirza Dedic
[mailto:mirde@oppy.com] <br>
<b>Sent:</b> Thursday, June 24, 2010 2:56 PM<br>
<b>To:</b> 'Nagios-Users'<br>
<b>Subject:</b> [Nagios-users] NSCA + NSClient<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Hi,<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>I have NSCA configured on my Nagios host, and enabled the
necessary plugins on NSClient++ to support NSCA, configure XINETD appropriately
inside my NSClient config I have:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>[NSCA Commands]<o:p></o:p></p>

<p class=MsoNormal>my_cpu_check=checkCPU warn=80 crit=90 time=20m time=10s
time=4<o:p></o:p></p>

<p class=MsoNormal>my_mem_check=checkMem MaxWarn=80% MaxCrit=90% ShowAll
type=page<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>This is just for testing, I also have in my nagios.cfg:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>accept_passive_service_checks=1<o:p></o:p></p>

<p class=MsoNormal>accept_passive_host_checks=1<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>In my NSClient Log I can see:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>2010-06-24 12:48:44:
debug:modules\NSCAAgent\NSCAThread.cpp:205: Executing (from NSCA): my_cpu_check<o:p></o:p></p>

<p class=MsoNormal>2010-06-24 12:48:44: debug:NSClient++.cpp:1106: Injecting:
checkCPU: warn=80, crit=90, time=20m, time=10s, time=4<o:p></o:p></p>

<p class=MsoNormal>2010-06-24 12:48:44: debug:NSClient++.cpp:1142: Injected
Result: OK 'OK CPU Load ok.'<o:p></o:p></p>

<p class=MsoNormal>2010-06-24 12:48:44: debug:NSClient++.cpp:1143: Injected
Performance Result: ''20m'=0%;80;90; '10s'=6%;80;90; '4'=0%;80;90; '<o:p></o:p></p>

<p class=MsoNormal>2010-06-24 12:48:44:
debug:modules\NSCAAgent\NSCAThread.cpp:205: Executing (from NSCA): my_mem_check<o:p></o:p></p>

<p class=MsoNormal>2010-06-24 12:48:44: debug:NSClient++.cpp:1106: Injecting:
checkMem: MaxWarn=80%, MaxCrit=90%, ShowAll, type=page<o:p></o:p></p>

<p class=MsoNormal>2010-06-24 12:48:44: debug:NSClient++.cpp:1142: Injected
Result: OK 'OK: page file: 8.82G'<o:p></o:p></p>

<p class=MsoNormal>2010-06-24 12:48:44: debug:NSClient++.cpp:1143: Injected
Performance Result: ''page file %'=45%;80;90; 'page
file'=8.81G;15.6;17.59;0;19.5; '<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>What I want to know is, until now I have been using active
checks, and for some servers I want to use passive_checks as well, so that the
server updates Nagios.<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>If I have active checks defined within my Nagios
installation such as:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>define service{<o:p></o:p></p>

<p class=MsoNormal>       
use                            
generic-service<o:p></o:p></p>

<p class=MsoNormal>       
host_name                      
van-mail01<o:p></o:p></p>

<p class=MsoNormal>       
service_description            
D - Disk Space<o:p></o:p></p>

<p class=MsoNormal>       
check_command                                    
check_nt_disk!D!98!99<o:p></o:p></p>

<p class=MsoNormal>}<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Can I modify this to also read from the passive_check, and
what would my [NSCA Commands] definition look like? Does the first part have to
reflect the service description? <o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>How does the information coming from the NSCA Client get
mapped to my configured checks?<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Thank you.<o:p></o:p></p>

<pre>The Oppenheimer Group ---- CONFIDENTIAL<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.<o:p></o:p></pre><pre><o:p> </o:p></pre></div>

</body>

</html>