-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Receiving 404 when trying to curl /metrics #159
Comments
Did you try a minimal example without Flask.threaded param and without any non-related imports (celery, pulsar, other sys libs..)? You can also use a static value for testing, to remove any possible issue with the / endpoint. Should be triggering right after app start, so no need to artifically curl endpoints: |
Thank you for your response. I tried all your suggestions, but I did not recognize any change. I did the minimal example by removing all the unrelated imports and set threading to false, but still received a 404. I also set the static value, but did not notice anything when restarting the app. I don't have anything running as a container in this instance. I see the curl attempt hit the app as the 404 is in the flask app logs, it just doesn't recognize /metrics. |
tried your code without the signal and alert_parse lines (see below) on mac with python 3.11.4, Flask 2.2.3, prometheus-flask-exporter 0.22.4:
|
Okay, let me go ahead and upgrade python and flask and give it a shot again. Thank you! |
So, in the end it looks like it doesn't like the debug flag below. I removed that and I am able to hit the /metrics endpoint now. app.run(host='0.0.0.0', port=5004, threaded=True, debug=True) |
Thanks for helping out here, everyone! ❤️ |
I catched it too, thanks for solution! |
I have a flask app running and I am attempting to utilize this exporter. Below is part of the code with addition of the exporter.
I am able to curl x.x.x.x:5004, but when i try x.x.x.x:5004/metrics, I am getting back a 404 and can't figure out why. Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: