Hi,
I am trying to use Prometheus with the postgres_exporter, but on a
different node - that is, Prometheus container is running on one server
(Debian), and should monitor a PostgreSQL container running on another
server (also Debian).
I added this to my prometheus.yml:
- job_name: postgres_exporter
static_configs:
- targets: ['10.97.8.97:9187']
where 10.97.8.97 is the ip of the server running PostgreSQL.
On the server running PostgreSQL , I used this command for the
postgres_exporter container:
docker run -d --name postgres_exporter -p 9187:9187 --net host -e
DATA_SOURCE_NAME=postgresql://octopusrepmgr:[email protected]:5013/mydb?sslmode=disable
wrouesnel/postgres_exporter
The container comes up OK, but Prometheus UI "Status->Targets" shows DOWN
with error:
Get "http://10.97.8.97:9187/metrics": context deadline exceeded
I also I tried with "localhost":
docker run -d --name postgres_exporter -p 9187:9187 --net host -e
DATA_SOURCE_NAME=postgresql://octopusrepmgr:secret@localhost:5013/mydb?sslmode=disable
wrouesnel/postgres_exporter
But same error is showing on Prometheus UI...
What am I doing wrong?
--
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/cc88141f-09f8-4b55-b046-b002c4fcd336n%40googlegroups.com.