<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=405362517-21112006><FONT face=Arial
color=#0000ff size=2>Hi,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=405362517-21112006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=405362517-21112006><FONT face=Arial
color=#0000ff size=2>I assume you have a host 'mike' and a service 'nmbd'
defined on it. Check if you have "accept_passive_service_checks=1" in nagios.cfg
and "passive_checks_enabled 1" in the service definition. If you open the
Service State Information page in the web interface it should also say that
passive checks are enabled.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=405362517-21112006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=405362517-21112006><FONT face=Arial
color=#0000ff size=2>Hope this helps.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=405362517-21112006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=405362517-21112006><FONT face=Arial
color=#0000ff size=2>Regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=405362517-21112006><FONT face=Arial
color=#0000ff size=2>Jedrzej</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=pl dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
nagios-users-bounces@lists.sourceforge.net
[mailto:nagios-users-bounces@lists.sourceforge.net] <B>On Behalf Of </B>Mike
Carpenter<BR><B>Sent:</B> Tuesday, November 21, 2006 6:20 PM<BR><B>To:</B>
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> [Nagios-users]
nsca/services issue<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have a question about nsca and
service checks. I am running nsca 2.6 and Nagios 2.5. I have just
trying to send a simple test service check to Nagios to see if I can get the
state to change…and it isn’t working…<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Here is what I am trying to
do…<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">From the remote
machine:<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">/usr/bin/send_nsca –H ian -d “;”
–c /etc/send_nagios.cfg < test<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The file test
contains:<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">mike;nmbd;2;’ok-just
one test’<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have configured nsca on the
Nagios server and the config file contains:<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">server_port=5667<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">server_address=192.168.1.10<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">nsca_user=nagios<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">nsca_group=nagios<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">debug=0<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">command_file=/usr/local/nagios/var/rw/nagios.cmd<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">alternate_dump_file=/usr/local/nagios/var/rw/nsca.dump<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">aggregate_writes=0<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">append_to_file=0<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">max_packet_age=30<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">password=password<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">decryption_method=10<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">The
send_nagios.cfg contains:<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">password=password<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">encryption_method=10<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">My
service check is:<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">define
service{<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
host_name
mike<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
service_description
syslog-ng<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
active_checks_enabled 0<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
passive_checks_enabled 1<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
check_freshness
0<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
is_volatile
1<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
max_check_attempts
1<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
normal_check_interval 1<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
retry_check_interval 1<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
check_period
none<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
contact_groups
nagios-admins<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
check_command
check_dummy!2!Critical<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
notification_options w,c,u<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
notification_period
24x7<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
notification_interval 120<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">
}<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">The
/var/log/messages file shows the following:<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">Nov
21 00:09:00 ian nsca[12202]: SERVICE CHECK -> Host Name: 'mike', Service
Description: 'nmbd', Return Code: '2', Output: ''ok-just one
test''<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">Nov
21 00:09:47 ian nagios: EXTERNAL COMMAND:
PROCESS_SERVICE_CHECK_RESULT;mike;nmbd;2;'ok-just one
test'<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">It
appears that the external command file is getting the check…but the host page
just sits there saying that the host hasn’t been checked. I have tried
several different states and still the same result. I understand that an
active check isnt being performed but I would think that because of the above
"PROCESS_SERVICE_CHECK_RESULT" line that the nagios.cmd file got the message
and the page should be updated with a critical message.</SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">I
read in the docs that the check needs to have the date in front of it …but
when I tried that I couldn’t get nsca to expand the variable…I have checked
permissions, etc.<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">So…where
have I messed up? LOL.<o:p></o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight"><o:p> </o:p></SPAN></FONT></DIV>
<DIV class=MsoNormal><FONT face=TheSansMonoCondensed-SemiLight color=#252525
size=1><SPAN
style="FONT-SIZE: 9pt; COLOR: #252525; FONT-FAMILY: TheSansMonoCondensed-SemiLight">Any
help is greatly appreciated.<o:p></o:p></SPAN></FONT></DIV>
<P><FONT color=#666666><FONT size=2>
<HR SIZE=1>
Sponsored Link</FONT></FONT><BR><BR><A
href="https://www2.nextag.com/goto.jsp?product=100000035&url=%2fst.jsp&tm=y&search=b_rate150k&s=3968&p=5035&disc=y&vers=722">Mortgage
rates as low as 4.625% - $150,000 loan for $579 a month.
Intro-*Terms</A></BLOCKQUOTE></BODY></HTML>