Darcy Buskermolen darcy
Mon Jan 31 16:54:58 PST 2005
On January 29, 2005 02:35 am, John Sidney-Woollett wrote:
> Can anyone give me some clues as to the best method to build a nagios
> plug-in to check for the existance (and correct running) of a slon
> daemon on a server? (We're using slony 1.0.5)
>
> Some options include:
>
> 1) Looking at netstat to see if slon is listening
>
> 2) looking at the process list, looking for slon, and the cluster name
>
> 3) Checking the slon output log
>
> 4) Is it possible to "talk" to the slon daemon to see if it is OK?
>
> 5) Querying the master cluster database - does the slony schema record
> which nodes are subscribed and actually connected (for the purposes of
> replication)? ie Find out the state of all slaves nodes by talking to
> the master/origin only.

My personal approch would be to query the sl_status view, since it will tell 
you when the last sync event was, how many events have happed since, and how 
far behind the slave is lagging.


>
> I think that the slon_watchdog2 script queries the database to see
> whether the node is working properly - is this the best approach?
>
> We want to use nagios to monitor our (currently) two slon processes (on
> different servers) and to let us know if a slon process dies.
>
> A plugin has to report an exit code of 0,1,2 or 3 (OK, Warning,
> Critical, Unknown) + a one line text message (eg "OK", "Slon daemon not
> found", "Slon node x not replicating" etc)
>
> Ideally a slon nagios plugin wants to do the following:
>
> a) Test to see if the slon daemon is running
> b) If running, test to see if it is replicating data correctly
> c) Return the appropriate result code
>
> Can anyone suggest a reliable method of testing for correct running of
> the slon process that would meet the requirement above? Ot give me some
> pointers on how to get started. BTW, I'm no perl programmer, but can
> learn :)
>
> Thanks
>
> John Sidney-Woollett
>
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at gborg.postgresql.org
> http://gborg.postgresql.org/mailman/listinfo/slony1-general

-- 
Darcy Buskermolen
Wavefire Technologies Corp.
ph: 250.717.0200
fx:  250.763.1759
http://www.wavefire.com


More information about the Slony1-general mailing list