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

add block rate feature to the ws_health_exporter role #78

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace: paritytech
name: chain

# The version of the collection. Must be compatible with semantic versioning
version: 1.10.2
version: 1.10.3

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
6 changes: 4 additions & 2 deletions roles/ws_health_exporter/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ ws_health_exporter_port: 8001
ws_health_exporter_log_level: INFO
ws_health_exporter_ws_check_interval: 10
ws_health_exporter_ws_timeout: 60
ws_health_exporter_node_max_unsynchronized_block_drift: 0
ws_health_exporter_node_min_peers: 10
ws_health_exporter_node_max_unsynchronized_block_drift: 0 # blocks, 0 - disabled
ws_health_exporter_node_min_peers: 10 # peers
ws_health_exporter_min_block_rate: 0.0 # blocks/second, 0.0 - disabled
ws_health_exporter_block_rate_measurement_period: 600 # seconds

ws_health_exporter_ws_urls:
- ws://127.0.0.1:9944
2 changes: 2 additions & 0 deletions roles/ws_health_exporter/templates/.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Environment="WSHE_WS_CHECK_INTERVAL={{ ws_health_exporter_ws_check_interval }}"
Environment="WSHE_WS_TIMEOUT={{ ws_health_exporter_ws_timeout }}"
Environment="WSHE_NODE_MAX_UNSYNCHRONIZED_BLOCK_DRIFT={{ ws_health_exporter_node_max_unsynchronized_block_drift }}"
Environment="WSHE_NODE_MIN_PEERS={{ ws_health_exporter_node_min_peers }}"
Environment="WSHE_MIN_BLOCK_RATE={{ ws_health_exporter_min_block_rate }}"
Environment="WSHE_BLOCK_RATE_MEASUREMENT_PERIOD={{ ws_health_exporter_block_rate_measurement_period }}"

ExecStart={{ _ws_health_exporter_venv }}/bin/python3 {{ _ws_health_exporter_file }}

Expand Down
Loading