Connect Prometheus to internal Service
charlesfr
PROOP

2 years ago

I'm following this Grafana integration guide (https://flower.readthedocs.io/en/latest/prometheus-integration.html#grafana-integration-guide) and attempting to connect Prometheus service to Flower.

I can see that Flower is reachable internally as "celery-flower.railway.internal" so I've set that as the target in prometheus.yml

global:
  scrape_interval:     15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: prometheus
    static_configs:
      - targets: ['localhost:9090']
  - job_name: flower
    static_configs:
      - targets:
          - "celery-flower.railway.internal"

However Prometheus is not able to connect to this service, why is this?

Thanks!

4 Replies

charlesfr
PROOP

2 years ago

f1b5f347-c845-4e49-a7a2-c861816cffd6


2 years ago

you need to also specify a port


charlesfr
PROOP

2 years ago

Yesss, thanks all working now!

Do you know if it's possible to configure Prometheus to fetch logs from a service?


2 years ago

that likely requires docker socket access, so your app would instead need to send its logs to promethus


Loading...