To collect Postgres metrics in prometheus, postgres_exporter is used. Containerization is not used, everything is done natively. Hardware metrics are collected in a prometheus through a job. To collect database metrics, I need to connect the prometheus_exporter to the database. Tell me how to configure the connection to the database. postgres_exporter has no configuration files. Шs it possible to do this via environment variables?
prometheus.yml:
scrape_configs:
- job_name: postgresql
static_configs:
- targets: ['xx.xx.xx.xx:9187']
labels:
alias: postgres