I've configured and enabled the postgresql module with the following config:
# Module: postgresql
# Docs: https://www.elastic.co/guide/en/beats/metricbeat/6.x/metricbeat-module-postgresql.html
- module: postgresql
metricsets:
- database
# - bgwriter
# - activity
period: 5s
hosts: ["postgres://myurl.com:5432"]
username: myuser
password: mypassword
But I can't make it work, the url, user and password are ok and the user has permission to query the databases activities.
The ouput config from metricbeats is:
|2019-02-07T20:50:43.588-0300|INFO|[monitoring]|log/log.go:144|Non-zero metrics in the last 30s|{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":160,"time":{"ms":22}},"total":{"ticks":500,"time":{"ms":29},"value":500},"user":{"ticks":340,"time":{"ms":7}}},"handles":{"limit":{"hard":4096,"soft":1024},"open":16},"info":{"ephemeral_id":"2042107a-3fdd-4231-aed5-3a670e0046b0","uptime":{"ms":363027}},"memstats":{"gc_next":7972560,"memory_alloc":6826496,"memory_total":40320744}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":7,"batches":7,"total":7},"read":{"bytes":3913},"write":{"bytes":7018}},"pipeline":{"clients":2,"events":{"active":0,"published":6,"total":6},"queue":{"acked":7}}},"metricbeat":{"postgresql":{"database":{"events":6,"failures":6}}},"system":{"load":{"1":0.71,"15":0.87,"5":0.81,"norm":{"1":0.0888,"15":0.1088,"5":0.1013}}}}}}|
|---|---|---|---|---|---|
|2019-02-07T20:51:13.588-0300|INFO|[monitoring]|log/log.go:144|Non-zero metrics in the last 30s|{"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":170,"time":{"ms":10}},"total":{"ticks":540,"time":{"ms":33},"value":540},"user":{"ticks":370,"time":{"ms":23}}},"handles":{"limit":{"hard":4096,"soft":1024},"open":10},"info":{"ephemeral_id":"2042107a-3fdd-4231-aed5-3a670e0046b0","uptime":{"ms":393028}},"memstats":{"gc_next":7959424,"memory_alloc":5168488,"memory_total":42040872,"rss":1118208}},"libbeat":{"config":{"module":{"running":0}},"output":{"events":{"acked":5,"batches":5,"total":5},"read":{"bytes":2795},"write":{"bytes":5019}},"pipeline":{"clients":2,"events":{"active":0,"published":5,"total":5},"queue":{"acked":5}}},"metricbeat":{"postgresql":{"database":{"events":5,"failures":5}}},"system":{"load":{"1":0.65,"15":0.86,"5":0.78,"norm":{"1":0.0813,"15":0.1075,"5":0.0975}}}}}}|
I've also configure the cloud.id and the cloud.auth parameters and the elastic and kibana were automatically configured. The modele system is sending logs ok when it is configured.
The postgres version is 10.4
Any ideas?
Thanks in advance
Juan Manuel