Cédric Villemain cedric.villemain at dalibo.com
Wed Jan 30 17:06:37 PST 2008
Glyn Astill a écrit :
> Attached is my perl script to do this.
>
> It's pretty basic so I doubt you lot would find it useful, but seeing
> as it really is a "my first perl script" any criticism would be
> welcome and appreciated.
>   

I have just look at it a quick view ... you would use the common 
postgresql command line options ....


Else, I suggest you to add a table to your set, like 'last_update_set_X' 
then update it every 1 second for ex.
And check the last update on all nodes, you will have a real mesure of 
the effective lag.
I prefer (or also) check replication outside system provided by the 
replication engine itself ....

> Glyn
>
> --- JP Fletcher <jpfletch at ca.afilias.info> wrote:
>
>   
>> Glyn Astill wrote:
>>     
>>> Hi chaps,
>>>
>>> I've been looking at the available plugins for nagios to check
>>>       
>> the
>>     
>>> state of Slony replication.
>>>
>>> I see theres a couple of perl scripts, that try and track an
>>>       
>> update
>>     
>>> across the nodes, then theres is a psql_replication_check.pl
>>>       
>> script
>>     
>>> that checks the timestamp on a recent update.
>>>
>>> Am I not mistaken in thinking that the best thing to monitor
>>>       
>> would be
>>     
>>> the sl_status view on each node? 
>>>       
>> I think you would want to monitor st_lag_num_events on the origin
>> for
>> each set, not on the downstream nodes.
>>
>>
>> Then if st_lag_num_events goes
>>     
>>> above a certain limit we know there may be a problem?
>>>
>>> Of course this would not help us on a table by table basis, but
>>>       
>> it's
>>     
>>> surely a good idea to be monitoring it is it not?
>>>
>>> And if so are is anyone aware of plugins that already exist
>>>       
>> before I
>>     
>>> attempt to create one?
>>>
>>> Glyn
>>>
>>>
>>>       ___________________________________________________________
>>> Support the World Aids Awareness campaign this month with Yahoo!
>>>       
>> For Good http://uk.promotions.yahoo.com/forgood/
>>     
>>> _______________________________________________
>>> Slony1-general mailing list
>>> Slony1-general at lists.slony.info
>>> http://lists.slony.info/mailman/listinfo/slony1-general
>>>       
>> -- 
>> JP Fletcher
>> Database Administrator
>> Afilias Canada
>> voice: 416.646.3304 ext. 4123
>> fax: 416.646.3305
>> mobile: 416.561.4763
>> jpfletch at ca.afilias.info
>>
>>     
>
>
>
>       ___________________________________________________________
> Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general
>   


-- 
Cédric Villemain
Administrateur de Base de Données
Cel: +33 (0)6 74 15 56 53
http://dalibo.com - http://dalibo.org



More information about the Slony1-general mailing list