docs(inputs.postgresql): Add permissions section (#15302)

This commit is contained in:
Joshua Powers 2024-05-07 09:58:00 -06:00 committed by GitHub
parent 0966bcbd4e
commit 82de39073e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -110,6 +110,19 @@ databases are gathered. Do NOT use with the 'ignored_databases' option.
databases = ["app_production", "testing"]`
```
### Permissions
The plugins gathers metrics from the `pg_stat_database` and `pg_stat_bgwriter`
views. To grant a user access to the views run:
```sql
GRANT pg_read_all_stats TO user;
```
See the [PostgreSQL docs][] for more information on the predefined roles.
[PostgreSQL docs]: https://www.postgresql.org/docs/current/predefined-roles.html
### TLS Configuration
Add the `sslkey`, `sslcert` and `sslrootcert` options to your DSN: