MetricsPort: new metric exposing time until online keys expire for relay operators using OfflineMasterKey
Summary
The number of tor relay operators using the OfflineMasterKey feature is increasing. To reduce the risk of relay outages caused by not renewed online keys, it would be great to help relay operators with monitoring their key expiry by exposing the timestamp when online keys expire and tor automatically shuts down in a prometheus metric.
This will allow relay operators to write alertmanager rules to notify them in time before their keys expire.
What is the expected behavior?
When connecting to the MetricsPort of a tor relay running in OfflineMasterKey mode, a metric will indicate the timestamp when online keys expire.
The metric could be named:
tor_relay_signing_cert_expiry_timestamp
and would have the same value as:
tor -f /path/to/torrc --key-expiration sign --format timestamp --quiet
Edited by nusenu