Git Product home page Git Product logo

Comments (7)

rgacote avatar rgacote commented on August 24, 2024 1

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.

zippolyte avatar zippolyte commented on August 24, 2024

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.

tonyo avatar tonyo commented on August 24, 2024

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.

mcasper avatar mcasper commented on August 24, 2024

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.

jdreaver avatar jdreaver commented on August 24, 2024

Is this fixed by #1016?

from integrations-core.

deanmarc25 avatar deanmarc25 commented on August 24, 2024

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.

masci avatar masci commented on August 24, 2024

Seems to be fixed, closing...

from integrations-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.