# Collection of self-managed PostgreSQL metrics

These settings are for the self-managed postgres deployments.

For the collector to scrape data from postgres, it requires a few things. Before continuing, complete the instructions in the Datadog documentation section on [Setting Up Database Monitoring for self-hosted PostgreSQL](https://docs.datadoghq.com/database_monitoring/setup_postgres/selfhosted/?tab=postgres15).

1. The PostgreSQL instance must be annotated:

```yaml
postgresql:
     primary:
       podAnnotations:
         ad.datadoghq.com/postgresql.check_names: '[
