The postgres_exporter queries configuration is deprecated, you don't need it to monitor postgres servers anymore.
On Tue, May 7, 2024 at 10:24 PM Christian Sanchez <[email protected]> wrote: > Hello, all. > > I've started to learn Prometheus and found out about the > postgres_exporter. I'd like to include metrics from the PostgreSQL server I > have running on Google Cloud. > > I don't understand how to actually build out the postgres_exporter.yml > file. The prometheus-community GitHub repository > <https://github.com/prometheus-community/postgres_exporter> doesn't seem > to have examples of building this file out. > > Maybe I am not reading the README in the repo that well, but I'd like to > see some examples of the exporter file. > > When running the Prometheus container, this is where I'm expecting to see > the exporter query options (see attachment) > > > I am running Prometheus and the Postgres Exporter through Docker Compose. > Here is my docker-compose.yml file: > version: '3' > services: > prometheus: > image: prom/prometheus > volumes: > - "./prometheus.yml:/etc/prometheus/prometheus.yml" > ports: > - 9090:9090 > > postgres-exporter: > image: prometheuscommunity/postgres-exporter > volumes: > - "./postgres_exporter.yml:/postgres_exporter.yml:ro" > ports: > - 9187:9187 > environment: > DATA_SOURCE_NAME: "postgresql://my-user:[email protected] > :5432/my-database?sslmode=disable" > > > Here is my prometheus.yml file: > global: > scrape_interval: 45s > > scrape_configs: > - job_name: 'prometheus' > static_configs: > - targets: ['localhost:9090'] > > - job_name: 'postgresql_exporter' > static_configs: > - targets: ['host.docker.internal:5432'] > > > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/71ef99c5-706c-420a-829e-0679680ee807n%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/71ef99c5-706c-420a-829e-0679680ee807n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CABbyFmqD2096pbffLZ6%3DUhbgB0PeV57Nrejr-mGN%2BtLPP2kRdg%40mail.gmail.com.

