diff options
author | Grégoire Détrez <gregoire@mullvad.net> | 2022-08-23 17:23:42 +0200 |
---|---|---|
committer | Grégoire Détrez <gregoire@mullvad.net> | 2022-08-23 17:23:42 +0200 |
commit | 3b4bbebc98db8411b996291ae30c5d15800ea107 (patch) | |
tree | f9fe4f91396df037d8709e98079ebf2bbcef744a | |
parent | a0bfd66e46bd27f1db2297c7a9634e12f983a9bb (diff) |
Add metrics for log time and tree sizegregoire/daemon
-rwxr-xr-x | sigsum-witness.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sigsum-witness.py b/sigsum-witness.py index 87e073e..5de433a 100755 --- a/sigsum-witness.py +++ b/sigsum-witness.py @@ -51,6 +51,12 @@ SIGNING_ERROR = prometheus.Counter( LAST_SUCCESS = prometheus.Gauge( "sigsum_witness_last_success", "Time of last successful signature" ) +LOG_TIME = prometheus.Gauge( + "sigsum_witness_log_time_unixtime", "Latest tree-head timestamp from the log." +) +TREE_SIZE = prometheus.Gauge( + "sigsum_witness_tree_size", "Latest tree size from the log." +) ERR_OK = 0 ERR_USAGE = os.EX_USAGE @@ -546,6 +552,8 @@ class Witness(threading.Thread): ERR_TREEHEAD_SIGNATURE_INVALID, "ERROR: signature of current tree head invalid", ) + LOG_TIME.set(new_tree_head.timestamp) + TREE_SIZE.set(new_tree_head.tree_size) err = sign_send_store_tree_head( self.signing_key, self.log_verification_key, new_tree_head ) |