Monitoring PostgreSQL connections using cricket and pg_stat_activity

Поиск
Список
Период
Сортировка
От Tony Wasson
Тема Monitoring PostgreSQL connections using cricket and pg_stat_activity
Дата
Msg-id 6d8daee30601042310l2099145dwa6213ba5badc9c3d@mail.gmail.com
обсуждение исходный текст
Ответы Re: Monitoring PostgreSQL connections using cricket and  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
I was unable to find examples of connection usage graphing and
trending. I really wanted this and after a bunch of googling, I just
made something up myself. It isn't fancy, but it seems to be working
fine for my purposes. This uses cricket to collect, store and graph
postgresql connection information. Here's what it currently graphs:

Active Connections  - COUNT(*) from pg_stat_activity

% of Connections Used (SHOW max_connections / COUNT(*) from pg_stat_activity)

Non Idle Connections - all the connections that weren't marked as <IDLE>

All Idle Connections - pg_stat_activity shows these connections as <IDLE>

Long Idle Connections - A connection that has been <IDLE> for more
than 5 minutes

Resting Connections - connections that have no query information. I
suspect these are connections starting up or shutting down, but feel
free to clue me in.

I thought about graphing the number of SELECTs/INSERTS/UPDATEs/DELETEs
currently running. If anyone is interested, I think it would be easy
to handle.

Hope you find this useful,
Tony

Вложения

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

Предыдущее
От: Pandurangan R S
Дата:
Сообщение: Re: plpgsql question
Следующее
От: Klint Gore
Дата:
Сообщение: Re: Putting restrictions on pg_dump?