Metricbeat - PostgreSQL authentication method


I am trying to use postgresql module for metricbeat but I get the following error:

error in QueryStats: failed to obtain a connection with the database: pq: Ident authentication failed for user "postgres"

My PostgreSQL database is configured with the Ident authentication method:

# IPv4 local connections:
host    all             all               ident

And postgresql module config file is:

[root@system ~]# cat /etc/metricbeat/modules.d/postgresql.yml
# Module: postgresql
# Docs:

- module: postgresql
    - database
    - bgwriter
    - activity
  period: 10s
  hosts: ["postgres://localhost:5432?sslmode=disable"]
  username: "postgres"
  #password: "password"

Is there any form to use Ident authentication with postgresql module?


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