Re: Log file monitoring and event notification

Поиск
Список
Период
Сортировка
От Steve Crawford
Тема Re: Log file monitoring and event notification
Дата
Msg-id 5342DCDB.5050307@pinpointresearch.com
обсуждение исходный текст
Ответ на Log file monitoring and event notification  (Andy Colson <andy@squeakycode.net>)
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: Hadi Moshayedi
Дата:
Сообщение: Re: Postgres as In-Memory Database?
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Initial queries of day slow