Problems with Distributed Monitoring
Marc Powell
marc at ena.com
Mon Dec 18 16:15:16 CET 2006
> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Bill Omer
> Sent: Sunday, December 17, 2006 12:29 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Problems with Distributed Monitoring
>
> I'm trying to configure a distributed monitoring setup and I am having
> some problems getting results processed by the central server.
I'm doing many thousands of distributed service checks but no host
checks. I'll see if I can help.
> I am using:
>
> check_external_commands=1
>
> I have active checks disabled in hosts.cfg and in my host templates.
> active_checks_enabled 0
>
> I also have (in the same configuration files) passive_checks_enabled 1
Ok good.
> On the distributed server, I'm using:
>
> ochp_command=submit_check_result
> ocsp_command=submit_check_result
> obsess_over_service=1
> obsess_over_hosts=1
>
Also set log_event_handlers=1 while your troubleshooting. That'll let
you know if Nagios is attempting to call your ochp/ocsp commands.
> In the services templates, I'm using obsess_over_service 1 for all
> services, too.
>
> In my commands.cfg I've added:
>
> define command{
> command_name submit_check_result
> command_line /usr/lib/nagios/plugins/submit_check_result
> $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATE$ '$SERVICEOUTPUT$'
> }
>
>
> define command{
> command_name submit_host_result
> command_line /usr/lib/nagios/plugins/submit_check_result
> $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATE$ '$SERVICEOUTPUT$'
> }
This needs to change to be host output information, not service output.
Also, the NSCA docs indicate that for passive host checks, only the
hostname, return code (determined by $HOSTSTATE$) and host output will
be needed. If you're going to use the same submit script you'll need to
add in some logic to determine between a host and service submission and
call send_nsca appropriately. If you're using the example
submit_check_result in the doccos it does not include that
functionality. Your command definition will look something like --
define command{
command_name submit_host_result
command_line /usr/lib/nagios/plugins/submit_check_result
$HOSTNAME$ $HOSTSTATE$ '$HOSTOUTPUT$'
}
> Finnaly, I can run /usr/lib/nagios/plugins/submit_check_result
> manually and it replies with:
> 1 data packet(s) sent to host successfully.
>
> However I never see anything in /var/log/nagios/nagios.log, even
> though I am using log_passive_checks=1
Enable debug in nsca.cfg on your master and watch /var/log/messages
while you submit. Is nsca running as a deamon or in (x)inetd mode?
Verify that you have the correct command_file specified in nsca.cfg and
that the user that nsca is running as has permissions to write to the
named pipe.
--
Marc
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list