Skip to content
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

feat: add metrics to watchdog canister #189

Merged
merged 4 commits into from
Apr 20, 2023
Merged

Conversation

maksymar
Copy link
Contributor

@maksymar maksymar commented Apr 19, 2023

This PR adds Prometheus metrics to a watchdog canister.

Metrics response example:

# HELP bitcoin_canister_height Height of the main chain of the Bitcoin canister.
# TYPE bitcoin_canister_height gauge
bitcoin_canister_height 786116 1681915083861
# HELP explorers_number Number of explorers inspected.
# TYPE explorers_number gauge
explorers_number 6 1681915083861
# HELP target_height Target height calculated from the explorers.
# TYPE target_height gauge
target_height 786116 1681915083861
# HELP height_diff Difference between the source and the target heights.
# TYPE height_diff gauge
height_diff 0 1681915083861
# HELP status Status code of the Bitcoin canister height.
# TYPE status gauge
status{height="not_enough_data"} 0 1681915083861
status{height="ok"} 1 1681915083861
status{height="ahead"} 0 1681915083861
status{height="behind"} 0 1681915083861

@maksymar maksymar requested a review from a team as a code owner April 19, 2023 14:42
@maksymar maksymar changed the title Draft: add prometheus metrics to watchdog canister feat: add prometheus metrics to watchdog canister Apr 19, 2023
@maksymar maksymar changed the title feat: add prometheus metrics to watchdog canister feat: add metrics to watchdog canister Apr 19, 2023
@maksymar maksymar merged commit 8b0360f into master Apr 20, 2023
@maksymar maksymar deleted the maksym-watchdog-metrics branch April 20, 2023 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants