On 04/05/2014 08:47 AM, Andy Colson wrote:
Hi All.
I've started using replication, and I'd like to monitor my logs for
any errors or problems. I don't want to do it manually, and I'm not
interested in stats (a la PgBadger).
What I'd like, is the instant PG logs: "FATAL: wal segment already
removed" (or some such bad thing), I'd like to get an email....
As one component of our monitoring we route logging through syslog which
has all messages go to one location for use by PgBadger and friends and
simultaneously any message with a WARN or higher priority goes to a
separate temporary "postgresql_trouble.log."
A cron-job checks this file periodically (currently we use 5-minutes)
for content. If the file has content the script sends the appropriate
emails and truncates the trouble log.
Cheers,
Steve
--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general