Prometheus Jenkins error (Status : down)

26 views
Skip to first unread message

Vaibhav Mishra

unread,
Dec 2, 2020, 3:21:02 PM12/2/20
to Prometheus Users
Hi ,
I started using prometheus with jenkins and after configuring for prometheus.yml I still get the status as down .
Jenkins:port-8080
Prometheus port : 9090
Jenkins and Prometheus both are running in docker on bridge .
- job_name: ‘jenkins’
  metrics_path: /prometheus
  static_configs:
    - targets: [‘localhost:8080’]
This update i did in prometheus.yml.
If anyone can he;p me to solve this issue .

b.ca...@pobox.com

unread,
Dec 2, 2020, 4:04:28 PM12/2/20
to Prometheus Users
If you go to the prometheus UI and look in the "Status > Targets" menu option, you'll see a description of why the target is down.

You can also test using curl and see what response you get:
Note: if these are two separate docker containers on a bridge, then I doubt that "localhost" can be used to access one container from the other one.  Try using the container name.

Vaibhav Mishra

unread,
Dec 3, 2020, 12:26:08 AM12/3/20
to Prometheus Users
Curl 'http://localhost:8080/prometheus'
gave an empty response 
and yes these are two separate docker containers on bridge . how can i use container name in prometheus.yml to access.

b.ca...@pobox.com

unread,
Dec 3, 2020, 3:20:45 AM12/3/20
to Prometheus Users
On Thursday, 3 December 2020 at 05:26:08 UTC mishra....@gmail.com wrote:
Curl 'http://localhost:8080/prometheus'
gave an empty response

Add flag "-v" to see the response:


To access the other container, try using its container name (as shown by "docker ps") and hope that docker resolves it for you, e.g.

Reply all
Reply to author
Forward
0 new messages