Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mvcc: Export a "Last DB compaction" timestamp metric (etcd-io#12176)
This is to aid with debugging the effectiveness of systems that manually take care of cluster compaction, and have greater visibity into recent compactions. It can be handy to alert on the exactly how long it was since a compaction (and also to put on dashboards) had happened. --- Tested using a test cluster, the final result looks like this: ``` root@etcd-1:~# ETCDCTL_API=3 /tmp/test-etcd/etcdctl --endpoints=192.168.232.10:2379 compact 1012 compacted revision 1012 root@etcd-1:~# curl -s 192.168.232.10:2379/metrics | grep last # HELP etcd_debugging_mvcc_db_compaction_last The unix time since the last db compaction. Resets to 0 on start. # TYPE etcd_debugging_mvcc_db_compaction_last gauge etcd_debugging_mvcc_db_compaction_last 1.595873939e+09 ```
- Loading branch information