> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polygon.technology/llms.txt
> Use this file to discover all available pages before exploring further.

# Setting Up Telemetry

> Configuration reference for setting up telemetry monitoring for Bor and Heimdall nodes.

Telemetry dashboards for monitoring node status in real time.

## Dashboard links

### Mainnet

* **Bor:** [https://bor-mainnet.vitwit.com/](https://bor-mainnet.vitwit.com/)
* **Heimdall:** [https://heimdall-mainnet.vitwit.com/](https://heimdall-mainnet.vitwit.com/)

### Amoy testnet

* **Bor:** [https://bor-amoy.vitwit.com/](https://bor-amoy.vitwit.com/)
* **Heimdall:** [https://heimdall-amoy.vitwit.com/](https://heimdall-amoy.vitwit.com/)

***

## Setting up Heimdall telemetry

### Step 1: Clone the repository

```sh theme={null}
git clone https://github.com/vitwit/matic-telemetry.git
```

### Step 2: Configure the telemetry directory

```sh theme={null}
cd matic-telemetry
mkdir -p ~/.telemetry/config
cp example.config.toml ~/.telemetry/config/config.toml
```

### Step 3: Modify the configuration file

```sh theme={null}
sudo nano ~/.telemetry/config/config.toml
```

Set the following values:

```toml theme={null}
[stats_details]
secret_key = ""
node = "<node-name>"
net_stats_ip = "heimdall-amoy.vitwit.com:3000"
```

| Field        | Mainnet value      | Amoy testnet value |
| ------------ | ------------------ | ------------------ |
| `secret_key` | `heimdall_mainnet` | `amoy-testnet`     |

### Step 4: Build and deploy telemetry

```sh theme={null}
go mod tidy
go build -o telemetry
mv telemetry /usr/bin
```

### Step 5: Create the telemetry service

```sh theme={null}
echo "[Unit]
Description=Telemetry
After=network-online.target

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

[Install]
WantedBy=multi-user.target" | sudo tee "/lib/systemd/system/telemetry.service"
```

### Step 6: Enable and start the service

```sh theme={null}
sudo systemctl enable telemetry.service
sudo systemctl start telemetry.service
```

### Step 7: Verify logs

```sh theme={null}
journalctl -u telemetry -f
```

***

## Setting up Bor telemetry

### Step 1: Open the Bor configuration file

```sh theme={null}
vi /var/lib/bor/config.toml
```

### Step 2: Modify the `ethstats` flag

```toml theme={null}
ethstats = "<name>:<network>@<url>:3000"
```

| Network      | Value                                          |
| ------------ | ---------------------------------------------- |
| Mainnet      | `<name>:mainnet@bor-mainnet.vitwit.com:3000`   |
| Amoy testnet | `<name>:amoy-testnet@bor-amoy.vitwit.com:3000` |

### Step 3: Restart Bor

```sh theme={null}
sudo systemctl restart bor
```
