Nlea
Explore posts from serversConnecting prometheus instance with python app via internal network
Hey @Brody , it is me again. I have now a second app I would like to connect to my running Prometheus instance on Railway.
The Dockerfile uses:
CMD uvicorn main:app --host='::' --port=$PORT
And I set an Enviroment variable via the railway UI :
PORT = 8000
In the Prometheus yaml I specified a second target:
- targets: ['fastapi-on-railway.railway.internal:8000']
I see that the Prometheus instance tries to connect to the new target but it gets the following error:
Get "http://fastapi-on-railway.railway.internal:8000/metrics": dial tcp [fd12:860e:5888::b:ab40:b92b]:8000: connect: connection refused
I think I did everything the same as for the first application but I wondering why I can't connect it towards the second app. Am I missing something? Do you maybe have an idea?26 replies
Connecting prometheus instance with python app via internal network
It works if I set the Variable Port to 8080 manually in the railway UI... but also now the public domain is not working anymore and I get back an "application failed" error.
Do you might have an idea how both points can work?
26 replies