vladvasiliu/kibana-prometheus-exporter-py

urljoin() trims path

mapshen opened this issue · 3 comments

For example, if I have KIBANA_URL set to http://localhost:5601/dev, this line gives out http://localhost:5601/api/status instead of http://localhost:5601/dev/api/status, which causes the warning:

WARNING:kibana_collector:Got a HTTP error 404 while trying to contact Kibana:
404 Client Error: Not Found for url: http://localhost:5601/api/status

Thanks for the report.
The issue is related to the way urljoin() works, apparently it expects a full path on the "base" side and a relative one on the "url" side.
See the related commit for the workaround. I've also added some tests, feel free to let me know if you see any missing cases.

Thanks for the report.
The issue is related to the way urljoin() works, apparently it expects a full path on the "base" side and a relative one on the "url" side.
See the related commit for the workaround. I've also added some tests, feel free to let me know if you see any missing cases.

Hi @vladvasiliu thanks a bunch for the quick response and comprehensive fix! The MR looks great to me.

I've merged this to master and bumped the version to 1.10. A docker container is being built.