monitoring pgbouncer sessions via graphite.

Asked by dmitryv

Hi Community,
Somebody tried to monitor pgbouncer sessions via Graphite?
For example I have an output like:
 database | user | cl_active | cl_waiting | sv_active | sv_idle | sv_used | sv_tested | sv_login | maxwait | pool_mode
-----------+------------------+-----------+------------+-----------+---------+---------+-----------+----------+---------+-----------
 db01 | db01 | 34 | 0 | 34 | 0 | 0 | 0 | 0 | 0 | session
 db02 | app_master | 13 | 0 | 4 | 1 | 0 | 0 | 0 | 0 | session
 db02 | bil | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | session
 db02 | db01 | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | session
 db02 | int | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | session
 db02 | db02 | 4 | 0 | 4 | 0 | 1 | 0 | 0 | 0 | session
 db02 | miac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | session
 db02 | n2o | 4 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | session
 db02 | rep | 5 | 0 | 5 | 0 | 0 | 0 | 0 | 0 | session
 db02 | typ | 29 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | session
 db02 | utl | 5 | 0 | 5 | 0 | 0 | 0 | 0 | 0 | session

Is there a way to send values for database/user/cl_active/cl_waiting to graphite?
Any comments really appreciated.

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jason Dixon (jason-dixongroup) said :
#1

Hi Dmitry,

You just need a simple script to retrieve and parse the data, then submit it to Carbon's plaintext listener. I'm not aware of any tools that already do this, but it should be easy to hack together in an hour.

http://graphite.readthedocs.io/en/latest/feeding-carbon.html#the-plaintext-protocol

Thanks,
Jason

Can you help with this problem?

Provide an answer of your own, or ask dmitryv for more information if necessary.

To post a message you must log in.