# Prometheus in docker-compose setting

**URL:** https://forum.pydio.com/t/prometheus-in-docker-compose-setting/5491
**Category:** Pydio Cells
**Tags:** docker
**Created:** [September 5, 2023, 9:00pm UTC](https://forum.pydio.com/t/prometheus-in-docker-compose-setting/5491 "2023-09-05T21:00:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![batonycle](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@batonycle](https://forum.pydio.com/u/batonycle)
#### Post date: [September 5, 2023, 9:00pm UTC](https://forum.pydio.com/t/prometheus-in-docker-compose-setting/5491/1 "2023-09-05T21:00:21Z")

</div>

I am trying to run pydio cells following this documentation page [Running a Cells container behind a Traefik reverse proxy | Pydio](https://pydio.com/en/docs/kb/deployment/running-cells-container-behind-traefik-reverse-proxy). I took the first example and added prometheus as in the “live environment” section. It seems to run fine but when I check `/prometheus/targets` they all fail with something like

```auto
Get "http://127.0.0.1:41645/metrics/77cb655a-7a50-4f2a-a5d4-58af7f5c6f5c": dial tcp 127.0.0.1:41645: connect: connection refused

```

Which makes sense because in

```auto
➜ cat ./metrics/prom_clients.json | jq
[                                              
  {                                            
    "targets": [                               
      "127.0.0.1:43645"                        
    ],                                         
    "labels": {                                
      " __metrics_path__": "/metrics/8131a2d8-f2ff-45de-9b2e-9b81e25ed1a8",
      "instance": "s:^pydio.grpc.jobs$",  
      "job": "cells",                          
      "pid": "54",                             
      "rootID": "8131a2d8-f2ff-45de-9b2e-9b81e25ed1a8"
    }                                          
  },  
  ...

```

the target address is always `127.0.0.1`, which is not accessible from the prometheus container. I guess replacing it with the name of the docker-compose service could do the trick, is there a config that I missed for this?

Thanks in advance for your help!

---

<div class="post-metadata">

### Author: ![bsinou](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/bsinou/32/476_2.png) [@bsinou](https://forum.pydio.com/u/bsinou)
#### Post date: [September 20, 2023, 7:41am UTC](https://forum.pydio.com/t/prometheus-in-docker-compose-setting/5491/2 "2023-09-20T07:41:06Z")

</div>

Hi @batonycle and welcome

You are indeed right, the conf described in the doc is not correct.

For this kind of setup we cannot use “file\_scraping” but rather “http scrapping”.

We have introduced this recently in cells. It is still experimental but we use it massively in our tests / validations setups.

I have updated the doc, but it is not yet pushed to the web server, you can yet find it here:

> <https://github.com/pydio/pydio-doc-howto/blob/2f49a520ef5d3966105838838d1661cdbbdc73ee/cells_proxy_traefik.md>

Let us now if some things are still unclear or not yet correct.

---

<div class="post-metadata">

### Author: ![batonycle](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@batonycle](https://forum.pydio.com/u/batonycle)
#### Post date: [September 20, 2023, 10:56am UTC](https://forum.pydio.com/t/prometheus-in-docker-compose-setting/5491/3 "2023-09-20T10:56:21Z")

</div>

Hi @bsinou

thank you for the response and for updating the docs!  
I will test this and let you know if I manage to make it work.

---

<div class="post-metadata">

### Author: ![batonycle](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@batonycle](https://forum.pydio.com/u/batonycle)
#### Post date: [September 20, 2023, 9:43pm UTC](https://forum.pydio.com/t/prometheus-in-docker-compose-setting/5491/4 "2023-09-20T21:43:53Z")

</div>

All good I finally get my metrics!  
I just had to modify the port in `prom.yml` to 8080 because I use the cells image from [linuxserver.io](http://linuxserver.io) (need the arm64 image for my raspberry pi)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/6/61f19fa52ec15fd4250db51aea351adba0e831fd.png) [@system](https://forum.pydio.com/u/system)
#### Post date: [November 19, 2023, 9:44pm UTC](https://forum.pydio.com/t/prometheus-in-docker-compose-setting/5491/5 "2023-11-19T21:44:37Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
