Move durationToString to common place and cleanup error handling.
Beginnings of a Prometheus status page.