prometheus-plex-exporter
prometheus-plex-exporter copied to clipboard
Retry failed websocket connection when connecting to Plex
First of all, thanks so much for building this - love being able to monitor my plex server from Grafana!
I think this is related to the TODO in listener.go
, but if you start the exporter before plex is ready then it fails to connect and doesn't retry, meaning you have to manually restart the exporter in order to then get metrics.
level=error msg="Get \"http://<ip>:32400/media/providers?includeStorage=1\": dial tcp <ip>:32400: connect: connection refused"
level=error msg="error in websocket processing" err="websocket: bad handshake"
level=info msg="Successfully connected" machineID= server=
I'm using Docker to run plex, the exporter, and the grafana agent. I've tried to mitigate by adding health checks to plex and configuring the exporter with a depends_on
but it appears that's not enough when the computer starts up. Easily rectified with docker-compose restart exporter
but I'd rather not have to remember to run this every day!