Add more metrics around resource indexes in the state store and replication indexes
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
Today its not possible to determine from telemetry whether replication in secondary datacenters is keeping up with the primary datacenter. There is the v1/acl/replication API for reporting on ACL replication status but it does not report on intention, config entry or federation states replication and there isn't an easy way to push this data into datadog or other metrics services.
I am thinking it would be nice to have a few more metrics around replication and the state store.
* `consul.state.index.*` - These would be metrics emitted in all datacenters to represent the latest raft index applied that affects the resource type. The `*` here is the resource type such as `nodes`, `services`, `checks`, `namespaces`, `kv`, `acls` and the list goes on.
* `consul.replication.*.enabled` - This indicates that a particular type of replication is enabled. The kinds are like `acl-tokens` `acl-roles`, `config-entries`, `federation-states` etc.
* `consul.replication.*.running` - Indicates that a kind of replication is running.
* `consul.replication.*.success` - Counter indicating how many successful rounds of replication have been performed
* `consul.replication.*.errored` - Counter indicating how many rounds of replication resulted in errors.
* `consul.replication.*.index` - Indicates that replication has completed through the given index. That index is a Raft index in the primary DC and would not correspond to local Raft indexes.
Contributor guide
Assessment
This issue has not been assessed yet.