<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.6944.0">
<TITLE>RE: [Nagios-users] Weirdness with remote (passive) checks. Critical on remote, OK on local?</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText46417 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2><FONT
face="Times New Roman">Another way to test this is to turn off active checks on
the central machine.</FONT></FONT></DIV>
<DIV dir=ltr><FONT size=2></FONT> </DIV>
<DIV dir=ltr><FONT size=2>Scott</FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2><FONT
face="Times New Roman"></FONT></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2><FONT
face="Times New Roman"></FONT></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2><FONT
face="Times New Roman"></FONT></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2><FONT
face="Times New Roman">Marc said:</FONT></FONT></DIV>
<DIV dir=ltr><FONT size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2><FONT
face="Times New Roman">It could be that nagios is actively checking the
host/service from your<BR>central machine. Nagios.log would be a good place to
look, on both<BR>machines for that matter. You'll probably want to look at your
log_<BR>lines in nagios.cfg to bump up your
logging.</FONT><BR></DIV></FONT></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> nagios-users-admin@lists.sourceforge.net
on behalf of Marc Powell<BR><B>Sent:</B> Tue 8/2/2005 3:51 PM<BR><B>To:</B>
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> RE: [Nagios-users]
Weirdness with remote (passive) checks. Critical on remote, OK on
local?<BR></FONT><BR></DIV>
<DIV><BR><BR>
<P><FONT size=2>> -----Original Message-----<BR>> From:
nagios-users-admin@lists.sourceforge.net [<A
href="mailto:nagios-users-">mailto:nagios-users-</A><BR>>
admin@lists.sourceforge.net] On Behalf Of Brian Smith<BR>> Sent: Tuesday,
August 02, 2005 2:30 PM<BR>> To: nagios-users@lists.sourceforge.net<BR>>
Subject: RE: [Nagios-users] Weirdness with remote (passive) checks.<BR>>
Critical on remote, OK on local?<BR>><BR>> Thanks Marc for the tips, but
this has just gotten weirder - neither<BR>> submit_check_result, nor
submit_check_result_via_nsca, seem to ever<BR>run.<BR>> NSCA is being
invoked, I see its process pop up when checks happen.<BR>> Checks are being
delivered to home base, because manual Critical<BR>states<BR>> get overridden
after a few minutes. Also, I can invoke this command<BR>and<BR>>
deliver a single distributed check successfully to home base:<BR>><BR>>
(folder)/submit_check_result_via_nsca remotehost 'Telnet' 2 'Because I<BR>>
said so'<BR>><BR>> That command successfully sends the service into a soft
critical state<BR>> on the home server, and running it multiple times sends
it to hard<BR>> critical.<BR><BR><BR>><BR>> I've tacked little "debug"
lines into the submit_check_result and<BR>> submit_..._via_nsca scripts to
echo their commands into a log file,<BR>and<BR>> the log file never gets
appended. So I put commands in to echo the<BR>word<BR>> 'test' into the
logfile, and that word never gets put in there either.<BR><BR>The destination
file is writeable by the nagios user?<BR><BR>><BR>> From the end of
checkcommands.cfg:<BR>><BR>> # 'submit_check_result'
command definition<BR>> define
command{<BR>>
command_name
submit_check_result<BR>>
command_line
$USER1$/eventhandlers/distributed-<BR>>
monitoring/submit_check_result_via_nsca<BR>>
$HOSTNAME$ '$SERVICEDESC$' $SERVICESTATE$
'$OUTPUT$'<BR>>
}<BR>><BR>> (except without the line breaks I inserted to make it behave
in the<BR>> email.)<BR>><BR>> It appears I will have to trace, from the
check queue to NSCA, how<BR>this<BR>> is being executed. Can anyone
tell me where in the config files the<BR>> following things could be
set:<BR>><BR>> location of a custom script, if it's not set in the lines
from<BR>> checkcommands.cfg above?<BR><BR>I'm not sure what you mean here. In
nagios.cfg you should have the<BR>following
--<BR><BR>obsess_over_services=1<BR>ocsp_command=submit_check_result<BR><BR>The
last may be what you're asking about.<BR><BR>For each service that you want to
send a result back for (or in a shared<BR>template), you should have the
following as part of the service{}<BR>definition --<BR><BR>obsess_over_service
1<BR><BR>Nagios will then execute the ocsp_command above for every service
that<BR>you are obsessing over. submit_check_result_via_nsca in your case
will<BR>parse the passed arguments, call send_nsca with the correct values
which<BR>connects to nsca on the central host which appends the results
to<BR>nagios.cmd. Enable debug for nsca if you haven't already and
watch<BR>/var/log/messages to watch the last few steps of that
process.<BR><BR>><BR>> What return codes are used for OK, Critical,
Warning, etc? So far it<BR><BR><A
href="http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN75">http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN75</A><BR><BR>>
appears Nagios is sending a 0 for all cases. If not Nagios,
whatever<BR>is<BR>> invoking NSCA is sending it, or whatever is invoking the
script that<BR>> invokes NSCA is. I can't figure out what the chain of
commands is<BR>here,<BR>> but I know that home base Nagios is working
correctly and NSCA is<BR>> sending / receiving correctly, and remote Nagios
is writing Critical<BR>in<BR>> the status logs.<BR>><BR>><BR>> And,
by the way, am I correct in assuming people on the mailing list<BR>> prefer
text-only emails? Otherwise I will send as html.<BR><BR>Yes, absolutely.
You should send only plain text e-mails to any<BR>[technical] mailing list you
are on, not just this one. HTML e-mails<BR>mess up archives and won't show up in
digests or munge the digests such<BR>that they are unreadable. There are other
appropriateness and perception<BR>reasons that are defined by each individual
that I won't get into... As<BR>always, the KISS rule applies here as
well.<BR><BR>--<BR>Marc<BR><BR><BR>-------------------------------------------------------<BR>SF.Net
email is sponsored by: Discover Easy Linux Migration Strategies<BR>from IBM.
Find simple to follow Roadmaps, straightforward articles,<BR>informative
Webcasts and more! Get everything you need to get up to<BR>speed, fast. <A
href="http://ads.osdn.com/?ad_idt77&alloc_id">http://ads.osdn.com/?ad_idt77&alloc_id</A>492&op=ick<BR>_______________________________________________<BR>Nagios-users
mailing list<BR>Nagios-users@lists.sourceforge.net<BR><A
href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</A><BR>:::
Please include Nagios version, plugin version (-v) and OS when reporting any
issue.<BR>::: Messages without supporting info will risk being sent to
/dev/null<BR></FONT></P></DIV>
</BODY>
</HTML>