How to track number of connections and hosts to Postgres cluster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Everyone,

I am working on an alert script to track the number of connections with the host IPs to the Postgres cluster.

1. I need all the host IPs making a connection to Postgres Cluster (even for a fraction of second).
2. I would also want to track number of IDLE connections, IDLE IN TRANSACTION connections and length of the connections as well.

I would be making use of pg_stat_activity and also thought of enabling logging the host ips in the db server log files which seems to be expensive for me (in terms of IO and logfile size).

Please let me know you if there are any alternatives.

Thanks
Venkat

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux