# Metricbeat postgresql 13.x, statement module needs update

**URL:** <https://discuss.elastic.co/t/metricbeat-postgresql-13-x-statement-module-needs-update/291530>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [December 12, 2021, 7:57am UTC](https://discuss.elastic.co/t/metricbeat-postgresql-13-x-statement-module-needs-update/291530 "2021-12-12T07:57:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_Goussey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/robin_goussey/32/98764_2.png) [@Robin\_Goussey](https://discuss.elastic.co/u/Robin_Goussey)\
**Post date:** [December 12, 2021, 7:57am UTC](https://discuss.elastic.co/t/metricbeat-postgresql-13-x-statement-module-needs-update/291530/1 "2021-12-12T07:57:47Z")

</div>

Hi,

I've been trying to get metricbeat to work with postgres. It works fine, however, I noticed some of the default dashboards had no data, after further investigation, I've" found that the time fields are always empty.

```auto
"postgresql": {
      "statement": {
        "user": {
          "id": 10
        },
        "database": {
          "oid": 13445
        },
        "query": {
          "calls": 6278239,
          "rows": 6278239,
          "time": {
            "mean": {},
            "stddev": {},
            "total": {},
            "min": {},
            "max": {}
          },
          "memory": {
            "shared": {
              "read": 8,
              "dirtied": 27780,
              "written": 27779,
              "hit": 6333822
            },
            "local": {
              "written": 0,
              "hit": 0,
              "read": 0,
              "dirtied": 0
            },
            "temp": {
              "read": 0,
              "written": 0
            }
          },
          "id": 9183934075978990000,
          "text": "insert into test_table(test) values ($1)"
        }
      }

```

After some research, I've found that postgres has updated their statement statistics: [PostgreSQL: Documentation: 13: F.29.&nbsp;pg\_stat\_statements](https://www.postgresql.org/docs/13/pgstatstatements.html)

Metricbeat looks for the field total\_time, but that field no longer exists. This in turn makes it so the dashboard is empty of top queries and it's durations. Should I file this as a bug on github, or an enhancement, or what can I do?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 9, 2022, 9:57am UTC](https://discuss.elastic.co/t/metricbeat-postgresql-13-x-statement-module-needs-update/291530/2 "2022-01-09T09:57:55Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
