Managing The Validator
This page describes the regular tasks that you may need to do, as a node runner.
Handling Upgrades
While automated upgrades via the governance mechanism and x/upgrade
are currently not supported, Cosmovisor-based upgrades can be used to install new binaries at specified heights. This is done via the add-upgrade
command and was used to upgrade the network to v1.1.1 successfully.
Monitoring Uptime
Enable Prometheus metrics in the configuration by editing the configuration files.
[telemetry]
# Prefixed with keys to separate services.
service-name = ""
# Enabled enables the application telemetry functionality. When enabled,
# an in-memory sink is also enabled by default. Operators may also enabled
# other sinks such as Prometheus.
enabled = true # THE LINE TO EDIT
# Enable prefixing gauge values with hostname.
enable-hostname = false
# Enable adding hostname to labels.
enable-hostname-label = false
# Enable adding service to labels.
enable-service-label = false
# PrometheusRetentionTime, when positive, enables a Prometheus metrics sink.
prometheus-retention-time = 0
# GlobalLabels defines a global set of name/value label tuples applied to all
# metrics emitted using the wrapper functions defined in telemetry package.
#
# Example:
# [["chain_id", "cosmoshub-1"]]
global-labels = [
]
[instrumentation]
# When true, Prometheus metrics are served under /metrics on
# PrometheusListenAddr.
# Check out the documentation for the list of available metrics.
prometheus = true # THE LINE TO EDIT
Set up a Prometheus instance to scrape the metrics exposed by your node.
scrape_configs:
- job_name: 'imuad'
static_configs:
- targets: ['localhost:26660']
Visualize these with Grafana by using its dashboards. Metrics include:
cometbft_consensus_latest_block_height
: The latest block heightcometbft_consensus_block_syncing
: Whether the node is synced or still catching up.cometbft_consensus_block_interval_seconds
: Time between blocks, useful for monitoring block production delays.
In addition, system level information can be loaded with prometheus-node-exporter
into Grafana to complement the metrics exposed by imuad
.
Lastly, third-party monitoring services such as ping.pub may be used when they add support for Imuachain.
Useful Commands
Stop the node
systemctl stop cosmovisor-imuad
Start the node
systemctl start cosmovisor-imuad
Restart the node
systemctl restart cosmovisor-imuad
Find my im1...
(account) address
imuad --home $HOMEDIR keys show -a $ACCOUNT_KEY_NAME
Get current height
imuad query block | jq .block.header.height
Check sync status
imuad status | jq
Get current validator set
imuad query tendermint-validator-set
Get own validator address
imuad --home $HOMEDIR tendermint show-address
Convert address formats
imuad debug addr <VALUE>
Get bytes32 val pub key
imuad --home $HOMEDIR --output json keys consensus-pubkey-to-bytes | jq -r .bytes32
Get bytes32 val pub key (another method)
imuad debug pubkey $(imuad --home $HOMEDIR tendermint show-validator)
Get JSON val pub key
imuad --home $HOMEDIR tendermint show-validator
Check node logs
journalctl -u imua -f
Get the number of peers
curl -s http://localhost:26657/net_info
Check transaction status
imuad query tx <hash>
Find my consensus address
imuad --home $HOMEDIR tendermint show-address
Find my P2P ID
imuad --home $HOMEDIR tendermint show-node-id
(assuming the node port hasn't changed; if it has, it may be supplied with --node
)
Last updated