# What roles are needed for the PostgreSQL user for Metricbeat?

**URL:** https://discuss.elastic.co/t/what-roles-are-needed-for-the-postgresql-user-for-metricbeat/208889
**Category:** Beats
**Tags:** metricbeat
**Created:** [November 21, 2019, 12:56pm UTC](https://discuss.elastic.co/t/what-roles-are-needed-for-the-postgresql-user-for-metricbeat/208889 "2019-11-21T12:56:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Radu\_Murzea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_murzea/32/48815_2.png) [@Radu\_Murzea](https://discuss.elastic.co/u/Radu_Murzea)
#### Post date: [November 21, 2019, 12:56pm UTC](https://discuss.elastic.co/t/what-roles-are-needed-for-the-postgresql-user-for-metricbeat/208889/1 "2019-11-21T12:56:18Z")

</div>

I plan to enable MetricBeat's PostgreSQL module in order to monitor my PostgreSQL instances.

In the module's config file, there is the option to include a username+password combination, so that MetricBeat can connect to PostgreSQL and extract the needed statistics from there.

FYI This is for a PRODUCTION environment, so keep that in mind.

I have 2 questions about this:

1). Is this mandatory? Can it work without a specified user?  
2). If a user is truly needed (and I'm guessing it's a good idea to use one), then what kind of a user is required for something like this? What roles and/or permissions should it have? Is it best practice to have a dedicated user created specially for this purpose with global-read-permission (or something similar) ?

ELK / Metricbeat version: 6.5.1  
PostgreSQL version: 9.5.x

---

<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: [December 19, 2019, 12:56pm UTC](https://discuss.elastic.co/t/what-roles-are-needed-for-the-postgresql-user-for-metricbeat/208889/2 "2019-12-19T12:56:27Z")

</div>

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