Distributed monitoring continued

Ric Moseley ric at nkn.net
Fri Mar 19 15:13:54 CET 2004


Yes, you must have both hosts and services defined on both servers.  The
reason the master might be doing service checks if because you might have
'freshness checking' on.  If a service is not fresh enough, the master will
perform its own check.  This is useful if one of the slave servers goies
down. 

In looking at the log file, your master is not receiving passive checks.

You should have a submit_check_result command in you libexec dir that you
created.  It will look something like: (change paths)

#!/bin/sh

# Arguments
#       $1 = name of host in service definition
#       $2 = name/description of service in service definition
#       $3 = return code (0=OK,1=warn,2=critical,3=unknown)
#       $4 = output
#       $5 = monitoring server

/bin/echo "$1\t$2\t$3\t$4\n" | /usr/local/nsca/send_nsca $5 -c
/usr/local/nsca/send_nsca.cfg

Then from command line you should be able to do: 

./submit_check_result <HOST> "<SERVICE>" 0 "ok" XXX.XXX.XXX.XXX

If all goes well you should see:

1 data packet(s) sent to host successfully.

Thanks. 

Ric. 

-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of James Bowes
Sent: Thursday, March 18, 2004 5:47 PM
To: Ric Moseley; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Distributed monitoring continued

Hi Ric.

Here's what I get on the distributed server:


 [1079610144] SERVICE;sim.test.net;check C
drive;UNKNOWN;3/3;HARD;1079610021;1079610924;ACTIVE;1;1;1;1079595842;0;U
NKNOWN;0;13258;0;0;0;0;1;0;0;1;0;0.00;0;1;1;1;wrong -l argument
[1079610144] SERVICE;sim.test.net;check D
drive;UNKNOWN;3/3;HARD;1079609853;1079610456;ACTIVE;1;1;1;1079595372;0;U
NKNOWN;0;14452;0;0;0;0;1;0;0;1;0;0.00;0;1;1;1;wrong -l argument
[1079610144] SERVICE;sim.test.net;check Exchange
services;OK;1/3;HARD;1079609865;1079610768;ACTIVE;1;1;1;1079595676;0;OK;
14148;0;0;0;0;0;1;0;0;1;0;0.00;0;1;1;1;All services are running

While on the central server, I get:

[1079653168] SERVICE;sim.test.net;check C
drive;PENDING;0/3;HARD;0;1079653723;ACTIVE;1;1;1;0;0;OK;0;0;0;0;0;0;1;0;
0;1;0;0.0;0;1;1;1;Service check scheduled for Thu Mar 18 15:48:43 2004
[1079653168] SERVICE;sim.test.net;check D
drive;PENDING;0/3;HARD;0;1079653255;ACTIVE;1;1;1;0;0;OK;0;0;0;0;0;0;1;0;
0;1;0;0.0;0;1;1;1;Service check scheduled for Thu Mar 18 15:40:55 2004
[1079653168] SERVICE;sim.test.net;check Exchange
services;PENDING;0/3;HARD;0;1079653567;ACTIVE;1;1;1;0;0;OK;0;0;0;0;0;0;1
;0;0;1;0;0.0;0;1;1;1;Service check scheduled for Thu Mar 18 15:46:07
2004

I am curious, I have service checking disabled on the central server and
accept passive enabled. I also have the distributed server as being
allowed in the nsca.cfg file.

Are the hosts to be defined on both servers?

--james 
-----Original Message-----
From: Ric Moseley [mailto:ric at nkn.net] 
Sent: Thursday, March 18, 2004 3:35 PM
To: James Bowes; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Distributed monitoring continued

In the nagios.log file you will see something line:

[1079652629] EXTERNAL COMMAND:
PROCESS_SERVICE_CHECK_RESULT;SERVER1;check_nt_process_custom_sqlservr_ex
e;0;
sqlservr.exe: Running

Make sure you allowed the remote server in you nsca.cfg file and that
you can send a command to the master server from command line. 

allowed_hosts=192.168.1.2,192.168.1.3,192.168.1.4

I run 15 servers in a giant cluster and it works well for me. 

Thanks.

Ric. 

-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of James
Bowes
Sent: Thursday, March 18, 2004 5:14 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Distributed monitoring continued

Hi.

I have the 2 servers running in a LAN for testing. I am not seeing
anything other than pending on the central server. I set up the nsca
service in /etc/services and the nsca aspect in xinetd.d/nsca. I have no
tcp_wrappers running and I can see the central server listening for
connections on port 5567.

Is there something I should be checking in the log files to see if
they're talking to each other?

James Bowes, Senior Consultant,
Express Computer Service Centre.
604-535-6508 ext.305 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux
tutorial presented by Daniel Robbins, President and CEO of GenToo
technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick
_______________________________________________
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



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux
tutorial presented by Daniel Robbins, President and CEO of GenToo
technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick
_______________________________________________
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



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick
_______________________________________________
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



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
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