-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add replication metrics #10073
Add replication metrics #10073
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
🍒 If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/355347. |
🍒 If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/355380. |
🍒 If backport labels were added before merging, cherry-picking will start automatically. To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/356166. |
* Merge pull request #10094 from hashicorp/update-fingerprint updating fingerprint * Add replication metrics (#10073) Co-authored-by: Daniel Nephin <[email protected]>
* Merge pull request #10094 from hashicorp/update-fingerprint updating fingerprint * Add replication metrics (#10073) Co-authored-by: Daniel Nephin <[email protected]>
# Conflicts: # agent/consul/replication.go
[Backport/1.8.x] Backport #10073
This adds metrics around replication status and latest replicated index to be emitted for:
The metrics will be emitted with the name:
consul.leader.replication.<type>.status
andconsul.leader.replication.<type>.index
The
status
one is 0 if the last round of replication errored and 1 if it didn't. Theindex
one is updated with the last replicated index.As we don't have unit tests to ensure metrics were emitted correctly I tested this manually like so:
make dev-docker
for this branchgit clone github.com/mkeeler/consul-docker-test
cd acls
within theconsul-docker-test
sourceterraform init
terraform apply -var consul_image=consul-dev
consul_leader_replication_acl_tokens_status
consul_leader_replication_acl_tokens_index
consul_leader_replication_acl_policies_status
consul_leader_replication_acl_policies_index
consul_leader_replication_acl_roles_status
consul_leader_replication_acl_roles_index
consul_leader_replication_config_entries_status
consul_leader_replication_config_entries_index
consul_leader_replication_federation_state_status
consul_leader_replication_federation_state_index