On 12/12/05, Tim Goodaire <[EMAIL PROTECTED]> wrote:
Also, I am interested in your mrtg graphing of replication lag. It's a project
that I've been meaning to look into. Would you mind sharing your mrtg
configuration?


not at all.
first - since i use mrtg to graph data from multiple servers i use snmp (net-snmp to be exact).
on database server i added this line to snmpd configuration:
exec replicationLagTime  /cvs/scripts/snmpReplicationLagTime.sh 2

where /cvs/scripts/snmpReplicationLagTime.sh looks like this:
#!/bin/bash
/home/pgdba/work/bin/psql -U pgdba -h 127.0.0.1 -p 5800 -d _DBNAME_ -qAt -c "select cast(extract(epoch from st_lag_time) as int8) FROM _irr.sl_status WHERE st_received = $1"

then in mrtg configuration i added this target:
Target[db_replication_lagtime]:extOutput.3&extOutput.3:[EMAIL PROTECTED]::30:::
MaxBytes[db_replication_lagtime]: 400000000
Title[db_replication_lagtime]: db: replication lag time
PageTop[db_replication_lagtime]: <H1>db: replication lag time</H1>
Options[db_replication_lagtime]: gauge,nopercent,growright

of course in your installation extOutput.NUMBER might be different, but that's easy to find out.
and that's it. nothing fancier.

depesz
_______________________________________________
Slony1-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/slony1-general

Reply via email to