Comments (7)
I note that you're using psycopg2 for access to pgbouncer.
Instead of trying to extract data positionally from the SHOW commands, I'd recommend you switch to using the psycopg2 Dict mode that allows you to reference the row columns by name, vs. trying to manage positional integrity:
http://initd.org/psycopg/docs/extras.html
psycopg2.connect(dsn, cursor_factory=DictCursor)
from integrations-core.
Hi @Verhaeg, thanks for reporting this. Indeed they recently added a column in pgbouncer/pgbouncer#212 though it's not been released yet. The check is working with pgbouncer version 1.7.2.
I'll add this to our backlog and keep the issue open to track the work !
from integrations-core.
PgBouncer version 1.8.1 is out, and it looks like there are some new/renamed columns (at least for SHOW STATS
) there as well:
pgbouncer=# SHOW POOLS;
database | user | cl_active | cl_waiting | sv_active | sv_idle | sv_used | sv_tested | sv_login | maxwait | maxwait_us | pool_mode
--------------+-----------+-----------+------------+-----------+---------+---------+-----------+----------+---------+------------+-------------
datadog | datadog | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | transaction
pgbouncer=# SHOW STATS;
database | total_xact_count | total_query_count | total_received | total_sent | total_xact_time | total_query_time | total_wait_time | avg_xact_count | avg_query_count | avg_recv | avg_sent | avg_xact_time | avg_query_time | avg_wait_time
--------------+------------------+-------------------+----------------+------------+-----------------+------------------+-----------------+----------------+-----------------+----------+----------+---------------+----------------+---------------
datadog | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
For this new version PgBouncer check fails with the same error:
...
assert len(row) == len(cols) + len(desc)
AssertionError
from integrations-core.
Furthermore, there are a couple open PRs in the pgbouncer repo that add even more stats:
pgbouncer/pgbouncer#168
pgbouncer/pgbouncer#72
It feels like we might need a more robust way of reporting the metrics that we recognize, and maybe just warning when we see new or unfamiliar statistics
from integrations-core.
Is this fixed by #1016?
from integrations-core.
FWIW I just installed the latest version of the DD agent (5.22.0) and I can now use the pgbouncer integration.
from integrations-core.
Seems to be fixed, closing...
from integrations-core.
Related Issues (20)
- Custom Metric on Elasticsearch Integration
- PR 16911 PostgreSQL: Add system_identifier breaks postgres.can_connect against PostgreSQL 9.2 systems
- ddev fails to start on corp network
- Openmetrics check fails to parse metrics with spaces in label values HOT 1
- [ArgoCD] Openmetrics integration in Datadog times out after 10 seconds
- Support new cockroachdb metrics for v24.1. HOT 2
- Fix cockroachdb metric names. HOT 2
- Fixing security vulnerability with md5 HOT 1
- Missing apiserver_admission_webhook_request_total metric
- MSK Agent Integration broken on KRaft Clusters HOT 3
- Documentation or blog needed describing datadog database Schemas
- [BUG] KafkaError{code=_TRANSPORT,val=-195,str="Failed to get metadata: Local: Broker transport failure"} HOT 7
- Karpenter metric changes HOT 2
- Elastic: snapshots (slm_stats) not working with OpenSearch
- "not a valid value for readpreferencetags" on mongo integration HOT 1
- Argo CD check failing to collect certain argocd.appset_controller metrics HOT 5
- Bug in haproxy example config
- [BUG] Disk integration `system.disk.read_time` `write_time` `system.io.await` missing mount name HOT 2
- aerospike integration cannot parse aerospike kubernetes operator logs properly
- Add process_cpu_seconds_total to kube_apiserver integration metrics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from integrations-core.