# Pq: SSL is not enabled on the server in Metricbeat log

**URL:** <https://discuss.elastic.co/t/pq-ssl-is-not-enabled-on-the-server-in-metricbeat-log/238785>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [June 26, 2020, 5:27am UTC](https://discuss.elastic.co/t/pq-ssl-is-not-enabled-on-the-server-in-metricbeat-log/238785 "2020-06-26T05:27:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![himalc](https://avatars.discourse-cdn.com/v4/letter/h/258eb7/32.png) [@himalc](https://discuss.elastic.co/u/himalc)\
**Post date:** [June 26, 2020, 5:27am UTC](https://discuss.elastic.co/t/pq-ssl-is-not-enabled-on-the-server-in-metricbeat-log/238785/1 "2020-06-26T05:27:40Z")

</div>

Hi,  
I have below issue when connecting to the postgresql database from Metricbeat postgres module.

2020-06-24T05:25:33 INFO module/wrapper.go:252 Error fetching data for metricset postgresql.activity: error in QueryStats: failed to obtain a connection with the database: pq: SSL is not enabled on the server. Any help?

modules.d/postgresql.yml  
hosts: ["postgresql://x.x.x.x:port?sslmode=require"]

---

<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:** [July 24, 2020, 7:27am UTC](https://discuss.elastic.co/t/pq-ssl-is-not-enabled-on-the-server-in-metricbeat-log/238785/2 "2020-07-24T07:27:48Z")

</div>

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