Skip to content

Commit

Permalink
Merge pull request #144 from sshankar/add-cancel-stats
Browse files Browse the repository at this point in the history
Publish server/client cancel statistics.
  • Loading branch information
SuperQ authored Apr 2, 2024
2 parents 006d442 + b165d48 commit 87fd7a7
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,20 @@ var (
"total_xact_time": {COUNTER, "server_in_transaction_seconds_total", 1e-6, "Total number of seconds spent by pgbouncer when connected to PostgreSQL in a transaction, either idle in transaction or executing queries"},
},
"pools": {
"database": {LABEL, "N/A", 1, "N/A"},
"user": {LABEL, "N/A", 1, "N/A"},
"cl_active": {GAUGE, "client_active_connections", 1, "Client connections linked to server connection and able to process queries, shown as connection"},
"cl_waiting": {GAUGE, "client_waiting_connections", 1, "Client connections waiting on a server connection, shown as connection"},
"sv_active": {GAUGE, "server_active_connections", 1, "Server connections linked to a client connection, shown as connection"},
"sv_idle": {GAUGE, "server_idle_connections", 1, "Server connections idle and ready for a client query, shown as connection"},
"sv_used": {GAUGE, "server_used_connections", 1, "Server connections idle more than server_check_delay, needing server_check_query, shown as connection"},
"sv_tested": {GAUGE, "server_testing_connections", 1, "Server connections currently running either server_reset_query or server_check_query, shown as connection"},
"sv_login": {GAUGE, "server_login_connections", 1, "Server connections currently in the process of logging in, shown as connection"},
"maxwait": {GAUGE, "client_maxwait_seconds", 1, "Age of oldest unserved client connection, shown as second"},
"database": {LABEL, "N/A", 1, "N/A"},
"user": {LABEL, "N/A", 1, "N/A"},
"cl_active": {GAUGE, "client_active_connections", 1, "Client connections linked to server connection and able to process queries, shown as connection"},
"cl_active_cancel_req": {GAUGE, "client_active_cancel_connections", 1, "Client connections that have forwarded query cancellations to the server and are waiting for the server response"},
"cl_waiting": {GAUGE, "client_waiting_connections", 1, "Client connections waiting on a server connection, shown as connection"},
"cl_waiting_cancel_req": {GAUGE, "client_waiting_cancel_connections", 1, "Client connections that have not forwarded query cancellations to the server yet"},
"sv_active": {GAUGE, "server_active_connections", 1, "Server connections linked to a client connection, shown as connection"},
"sv_active_cancel": {GAUGE, "server_active_cancel_connections", 1, "Server connections that are currently forwarding a cancel request."},
"sv_being_canceled": {GAUGE, "server_being_canceled_connections", 1, "Servers that normally could become idle but are waiting to do so until all in-flight cancel requests have completed that were sent to cancel a query on this server."},
"sv_idle": {GAUGE, "server_idle_connections", 1, "Server connections idle and ready for a client query, shown as connection"},
"sv_used": {GAUGE, "server_used_connections", 1, "Server connections idle more than server_check_delay, needing server_check_query, shown as connection"},
"sv_tested": {GAUGE, "server_testing_connections", 1, "Server connections currently running either server_reset_query or server_check_query, shown as connection"},
"sv_login": {GAUGE, "server_login_connections", 1, "Server connections currently in the process of logging in, shown as connection"},
"maxwait": {GAUGE, "client_maxwait_seconds", 1, "Age of oldest unserved client connection, shown as second"},
},
}

Expand Down

0 comments on commit 87fd7a7

Please sign in to comment.