brandonweeks / vsphere_exporter

A Prometheus exporter for vSphere
Apache License 2.0
26 stars 15 forks source link

vsphere_exporter never re-authenticates #13

Open lubyou opened 7 years ago

lubyou commented 7 years ago

Hi,

I was giving your exporter a try.

I just launched it, queried the /metrics URI via browser, and then went away for half an hour without querying it.

Once I returned, I queried the /metrics URI again, upon which is exporter exited due to authentication issues.

It seems like the exporter authenticates once, and then just reuses the client object, which is probably fine, until your vcenter goes away, your authenticated client times out (like in my case), or you run into any other issues that prevents exporter <> vcenter communication.

Would it be possible to handle this case?

Thank you

doppelgrau commented 6 years ago

I think the easiest solution is to let systemd (or some script) restart it, when it exits