Nlea
Explore posts from serversConnecting prometheus instance with python app via internal network
Hey everyone,
I am new to Railway. I deployed a Python App to railway via GitHub repo and Dockerimage and did the same for a Prometheus instance in a separated repo. Both apps are up and running. Within the Python app I have set the variable
PORT = 80
because without this setting I would have been not able to access the app.
The python app provides an endpoint /metrics form there I want the prometheus instance to poll the metrics.
To do so one can configure a prometheus.yml. I managed that Prometheus is connecting to my app via the public domain, but I would like to have it connect via the internal network. I tried multiple things but it is still failing.
My prometheus.yml looks like this:
I tried different target options for the internal one including:
0.0.0.0:80
, fastapi-on-railway.railway.internal:80
and basically fastapi-on-railway
.
If I look into the Prometheus frontend it takes the endpoint but reports that the service is down.
Has anyone an idea how to make this connection within the Railway network? This would be amazing!
Thank you and cheers
Nele26 replies