Closed jgrossmac closed 9 months ago
@jgrossmac I can confirm that. I will look into it (I wrote that piece) and for some magical reasons that I cannot explain right now this did work in my tests.
It seems this issue is related to OctoPrint. I opened an issue octoprint/octoprint#4670
So the solution with curl would be
curl -X POST -b /tmp/octoprint-cookie.txt -c /tmp/octoprint-cookie.txt localhost:5000/api/login?passive=true
curl -b /tmp/octoprint-cookie.txt -c /tmp/octoprint-cookie.txt localhost:5000/plugin/prometheus_exporter/metrics
But AFAIK this does not work with prometheus. In this context it's a won't fix and and API key is always required. Setting individual permissions per user (access/no access) for metrics works fine.
This is really interesting. I don't see a reason why we need a cookie for unauthenticated/public requests...
This is a confirmed bug in OctoPrint and will be fixed in 1.9.0.
@jgrossmac This was fixed, I can't reproduce it with OctoPrint 1.9.1.
Please close the issue or comment if this problem persists.
Thanks for the heads up, I'm closing this!