[check_postgres] hot_standby_delay parameters

Guillaume Lelarge guillaume at lelarge.info
Mon Dec 24 08:27:49 UTC 2012


On Mon, 2012-12-17 at 16:55 -0800, Collin Peters wrote:
> Hello,
> 
> I have just setup streaming replication on our production server and am
> adding the hot_standby_delay check to our existing Nagios install (already
> using Check_postgres)
> 
> I don't quite follow from the instructions what I should be putting in the
> check for the warning/critical values.  What value exactly is the plugin
> returning?
> 

A number of bytes. All the bytes that have not been received, and
replayed on the slave.

> Can someone also verify the following syntax for the check (from our
> staging server):
> nagios at staging-postgres1:~$
> /usr/lib/nagios/plugins/postgres/check_postgres_hot_standby_delay  -db
> intouch_staging_db -H 192.168.80.182,192.168.80.184 -u nagios -w 1 -c 2
> POSTGRES_HOT_STANDBY_DELAY OK: DB "intouch_staging_db"
> (host:192.168.80.182) 0 | time=0.05s replay_delay=0;1;2
>  receive-delay=0;1;2
> 
> 192.168.80.182 is the master (staging-postgres1) and 192.168.80.184 is the
> slave.
> 

Seems fine to me, except the critical and warning values.

> So specifically, the warning/critical values of 1/2, are these totally off
> base?

Yes, it basically means you don't allow any lag between your master and
your slave.

>   Is this number of transactions behind?

Nope.

>   Bytes?
> 

Yes. For our customers, we usually use 700kB as the warning value, and
1MB as the critical value. Works fine for us.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



More information about the Check_postgres mailing list