Closed martabal closed 2 years ago
Thanks for the report @martabal. qBittorrent needs to be up for qbittorrent-exporter
to call the qBittorrent API, so requests to qbittorrent-exporter
will fail if qBittorrent is down (with these exceptions in the log). It will resume normally once qBittorrent is back up.
Is your suggestion that qbittorrent-exporter
should continue to export data (perhaps adding a qbittorrent_up
flag) when qBittorrent is down? As of now I am using the "return a 500 response" approach listed in the Prometheus "failed scrapes" documentation.
On a side note, your issue also made me realize that qbittorrent-exporter
will fail to start when qBittorrent is down. I opened #9 for that issue which I will resolve.
Yes, it is perfectly normal to wait for qBittorrent to be up and running again. My suggestion is that qbittorrent-exporter restarts to export data when qBittorrent is up.
@martabal that is how it currently works - if qBittorrent restarts, the exporter will continue normally when qBittorrent comes back up.
The header parser received no bytes
in the error message sounds like it's something on the qBittorrent side.
If you can provide the following info I can look into the problem:
I am using qbittorrent v4.4.1and qbittorrent-exporter v1.3.1
After further investigations, here is the error message i get when i restart qbittorrent :
qbittorrent.api.ApiException: An error occurred calling http://xxx.xxx.xxx.xxx:xxxx/api/v2/torrents/info: (403) Forbidden
Maybe it is an error with the authentication ?
Okay, good find. I'm running 4.4.0. The authentication relies on an "auth cookie" returned from the initial login, but maybe restarting qBittorrent in 4.4.1 now invalidates that cookie.
I will try to reproduce this. I think a simple fix would be just getting a new auth cookie if a 403 is returned, but either way I will get this fixed. 👍
@martabal This has been fixed in 1.3.2 and a new image is available on DockerHub (make sure to repull your image if you're using the latest
tag).
I tested it and it works perfectly. Thank you so much!
Start qBittorrent then qBittorrent-exporter, stop qBittorrent and then restart qBittorrent. Ater the restart qBittorrent-exporter doesn't resume.