Skip to main content

Heimdall Telemetry

Steps to Set Up Monitoring For Heimdall Nodes on Shibarium and Puppynet

Follow these steps to set up telemetry for monitoring your Heimdall nodes on Shibarium and Puppynet.

1. Clone the Repository and Set Up Configuration

git clone https://github.com/shibaone/k9-matic-telemetry.git
cd k9-matic-telemetry
mkdir -p ~/.telemetry/config
cp example.config.toml ~/.telemetry/config/config.toml

2. Update the Configuration File

Modify the config.toml file located at ~/.telemetry/config/config.toml.

Update the [stats_details] section with your node name. The secret_key and net_stats_ip will remain the same as provided below. Be sure to update the node value with your specific node name.

For Shibarium network:

[stats_details]
secret_key = "heimdall_shibarium"
node = "<node-name>"
net_stats_ip = "shibarium-heimdall-ethstat.shib.io:443"
retry_delay = "250ms"

For Puppynet network:

[stats_details]
secret_key = "heimdall_puppynet"
node = "<node-name>"
net_stats_ip = "puppynet-heimdall-ethstat.shib.io:443"
retry_delay = "250ms"

3. Build the Telemetry Binary

Navigate to the k9-matic-telemetry directory and run the following commands to build the telemetry binary:

go mod tidy
go build -o telemetry
mv telemetry $GOBIN

4. Create a Systemd Service

Create a systemd service file to manage the telemetry process. You can use a custom service name if needed.

Path: /lib/systemd/system/telemetry.service

[Unit]
Description=Telemetry
After=network-online.target

[Service]
User=$USER
ExecStart=$(which telemetry)
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
warning

** Ensure to double-check the User and ExecStart fields in the systemd file for accuracy **

5. Start and Enable the Telemetry Service

Start the telemetry service and enable it to run at system startup:

sudo systemctl enable telemetry.service
sudo systemctl start telemetry.service

6. Monitor the Service

Check the service logs using journalctl to ensure it is working correctly:

journalctl -u telemetry -f

7. Verify Node Visibility

Ensure your node is listed on the telemetry monitoring pages:

This completes the setup. Your telemetry service should now be exporting metrics for your Heimdall node.