Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgBouncer v1.23 New Metrics not supported by nri-postgresql #170

Open
leofernandezg opened this issue Sep 26, 2024 · 1 comment
Open

pgBouncer v1.23 New Metrics not supported by nri-postgresql #170

leofernandezg opened this issue Sep 26, 2024 · 1 comment

Comments

@leofernandezg
Copy link

leofernandezg commented Sep 26, 2024

We updated pgBouncer to v1.23, and we had this error:

 fields.msg="Could not execute index query: missing destination name total_server_assignment_count in *[]struct { 
 metrics.databaseBase; TotalXactCount *int64 \"db:\\\"total_xact_count\\\"  
 metric_name:\\\"pgbouncer.stats.transactionsPerSecond\\\"                           
 source_type:\\\"rate\\\"\"; TotalQueryCount *int64 \"db:\\\"total_query_count\\\" 
 metric_name:\\\"pgbouncer.stats.queriesPerSecond\\\"                                
 source_type:\\\"rate\\\"\"; TotalReceived *int64 \"db:\\\"total_received\\\"    
 metric_name:\\\"pgbouncer.stats.bytesInPerSecond\\\"                                
 source_type:\\\"rate\\\"\"; TotalSent *int64 \"db:\\\"total_sent\\\"        
 metric_name:\\\"pgbouncer.stats.bytesOutPerSecond\\\"                               
 source_type:\\\"rate\\\"\"; TotalXactTime *int64 \"db:\\\"total_xact_time\\\"   
 metric_name:\\\"pgbouncer.stats.totalTransactionDurationInMillisecondsPerSecond\\\" 
 source_type:\\\"rate\\\"\"; TotalQueryTime *int64 \"db:\\\"total_query_time\\\"  
 metric_name:\\\"pgbouncer.stats.totalQueryDurationInMillisecondsPerSecond\\\"       
 source_type:\\\"rate\\\"\"; TotalRequests *int64 \"db:\\\"total_requests\\\"    
 metric_name:\\\"pgbouncer.stats.requestsPerSecond\\\"                               
 source_type:\\\"rate\\\"\"; TotalWaitTime *int64 \"db:\\\"total_wait_time\\\"\"; AvgXactCount *int64 \"db:\\\"avg_xact_count\\\"    
 metric_name:\\\"pgbouncer.stats.avgTransactionCount\\\"                             
 source_type:\\\"gauge\\\"\"; AvgXactTime *int64 \"db:\\\"avg_xact_time\\\"     
 metric_name:\\\"pgbouncer.stats.avgTransactionDurationInMilliseconds\\\"            
 source_type:\\\"gauge\\\"\"; AvgQueryCount *int64 \"db:\\\"avg_query_count\\\"   
 metric_name:\\\"pgbouncer.stats.avgQueryCount\\\"                         
 source_type:\\\"gauge\\\"\"; AvgRecv *int64 \"db:\\\"avg_recv\\\"          
 metric_name:\\\"pgbouncer.stats.avgBytesIn\\\"                                      
 source_type:\\\"gauge\\\"\"; AvgSent *int64 \"db:\\\"avg_sent\\\"          
 metric_name:\\\"pgbouncer.stats.avgBytesOut\\\"                                     
 source_type:\\\"gauge\\\"\"; AvgReq *int64 \"db:\\\"avg_req\\\"           
 metric_name:\\\"pgbouncer.stats.avgRequestsPerSecond\\\"                            
 source_type:\\\"gauge\\\"\"; AvgQueryTime *int64 \"db:\\\"avg_query_time\\\"    
 metric_name:\\\"pgbouncer.stats.avgQueryDurationInMilliseconds\\\"                  
 source_type:\\\"gauge\\\"\"; AvgQuery *int64 \"db:\\\"avg_query\\\"         
 metric_name:\\\"pgbouncer.stats.avgQueryDurationInMilliseconds\\\"                  
 source_type:\\\"gauge\\\"\"; AvgWaitTime *int64 \"db:\\\"avg_wait_time\\\"\" }" 
 integration_name=nri-postgresql role=postgresql runner_uid=9063b0ec77  

This is due the new version of pgBouncer added 2 new columns: total_server_assignment_count and avg_server_assignment_count, which are not supported yet for the nri-postgresql.

Please update this file to add it in the query SHOW STATS;:

AvgQueryCount *int64 `db:"avg_query_count" metric_name:"pgbouncer.stats.avgQueryCount" source_type:"gauge"`

The change should be similar to the one in this PR: #121 , when pgBouncer added Pool metrics in v1.18

@workato-integration
Copy link

@leofernandezg leofernandezg changed the title pgbouncer-1v23-new-metrics pgBouncer v1.23 New Metrics not supported by nri-postgresql Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant