Community Tools & Services
Blacknodes contribution to
Blacknodes contribution to
Follow these steps to quickly install and set up your Avail node:
wget https://files4.blacknodes.net/avail/avail-node-installer.sh
chmod +x avail-node-installer.sh
./avail-node-installer.sh
sudo journalctl -u avail -f
https://avail-rpc.blacknodes.net
Install Monitoring Tools (Prometheus and Grafana) using this script:
wget https://raw.githubusercontent.com/blacknodes/Scripts/main/install-monitoring-tools.sh
sudo chmod +x install-monitoring-tools.sh
./install-monitoring-tools.sh
Add Job "avail-node" in prometheus config file:
sed -i '/scrape_configs:/a \
- job_name: "avail-node"\
static_configs:\
- targets: ["localhost:9615"]' /opt/prometheus/prometheus.yml
Update Avail service file to enable Prometheus metrics:
sudo systemctl stop avail.service
# Update service file with prometheus flag
sudo sed -i '/ExecStart=/s/$/ --prometheus-external/' /etc/systemd/system/avail.service
sudo systemctl daemon-reload
sudo systemctl restart avail.service
sudo systemctl restart prometheus.service
Make sure to enable port 3000 for Grafana access:
sudo ufw allow 3000
Access Grafana at http://yourip:3000
Add New DataSource Prometheus
Set Alert
Use these metrics for alerts (recommended for validator monitoring):
# Node sync status
substrate_sub_libp2p_is_major_syncing{chain="avail_da_mainnet"}
# Block height monitoring
rate(substrate_block_height{status="finalized",chain="avail_da_mainnet"}[5m])
# Peer count monitoring
substrate_sub_libp2p_peers_count{chain="avail_da_mainnet"}
Example Alert Conditions:
substrate_sub_libp2p_is_major_syncing
is 1 (node is syncing)substrate_sub_libp2p_peers_count
falls below 3Add Notification Channel (Using Telegram)
Use https://t.me/BotFather to create your notification bot and https://t.me/userinfobot to check your Telegram ID.
Add new Contact point, paste your bot API token and Telegram ID there
Example Alert Message Template:
{{ if eq .Status "firing" }}??{{ else }}?{{ end }} {{ .Status | toUpper }}
Instance: {{ .Labels.instance }}
Alert: {{ .Labels.alertname }}
Message: {{ .Annotations.message }}
Your telegram bot will now alert you when:
Not Available for Avail Mainnet
Latest Snapshot is updated every 6 hours
Follow these steps to apply the snapshot:
sudo systemctl stop avail.service
wget https://files4.blacknodes.net/avail/avail_da_mainnet_756435.tar.lz4
rm -rf $HOME/.avail/data/chains/avail_da_mainnet/paritydb/full/*
lz4 -c -d avail_da_mainnet_756435.tar.lz4 | tar -x -C $HOME/.avail/data/chains/avail_da_mainnet/paritydb/full
sudo systemctl start avail.service
To add peers to your Avail node, you can use these methods:
curl -s https://services.blacknodes.net/avail/data/peers.txt | \
while read peer; do
avail-node --add-reserved-peer $peer
done
Edit your node configuration file and add these peers under the network section:
reserved-nodes = [
"/ip4/65.108.229.11/tcp/30333/p2p/12D3KooWRMYEGJkWM8CQu7JRwhdHYRsHLutQVJx3gHnfRfCfYS3X",
"/ip4/65.109.88.254/tcp/30333/p2p/12D3KooWPSPLPyDFtcbKUvQGWM7GCQNpGyVwbwXEWVHWRBH6QQFz"
]
Add BlackNodes peer to your node:
/ip4/65.108.229.11/tcp/30334/ws/p2p/12D3KooWEGbtjEYKb3ZrcEvHBY3EQchfKZUzPezC7p3n43FUrWsa
Add to your node using:
avail-node --add-reserved-peer /ip4/65.108.229.11/tcp/30334/ws/p2p/12D3KooWEGbtjEYKb3ZrcEvHBY3EQchfKZUzPezC7p3n43FUrWsa