> For the complete documentation index, see [llms.txt](https://skyneticlabs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skyneticlabs.gitbook.io/docs/monitoring/tenderduty-v2-monitoring-and-alerting.md).

# 🔸 TenderDuty v2 — Monitoring and Alerting

### Overview

**TenderDuty v2** is a modern monitoring and alerting system designed for validators and full nodes in Tendermint-based networks.\
It provides real-time insights into node performance and validator behavior, including:

* Network height and synchronization status
* Validator uptime and missed blocks
* Voting power changes and commission tracking
* Custom alerting via **Discord** and **Telegram**

Running TenderDuty on a separate monitoring server is highly recommended to isolate it from validator infrastructure.

***

### 1. System Preparation

Update packages and install dependencies:

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git jq tmux make gcc build-essential htop unzip \
pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu
```

***

### 2. Install Docker

```bash
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
  "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
sudo apt install -y docker-ce
docker --version
```

***

### 3. Deploy TenderDuty

Run TenderDuty inside a `tmux` session:

```bash
tmux new -s tenderduty
mkdir ~/tenderduty && cd ~/tenderduty
docker run --rm ghcr.io/blockpane/tenderduty:latest -example-config > config.yml
```

You can also download a ready-to-edit configuration template:

```bash
wget -O ~/tenderduty/config.yml https://raw.githubusercontent.com/111STAVR111/props/main/Tenderduty/config.yml
```

***

### 4. Configuration

Edit the configuration file:

```bash
nano ~/tenderduty/config.yml
```

Replace the following fields:

```yaml
network: <network_name>
chain-id: <your_chain_id>
valoper_address: <your_valoper_address>
url: <open_RPC_or_backup_RPC>
```

**Tip:** Use a public RPC endpoint or a backup node; exposing your validator RPC port is not recommended.

***

### 5. Start the Container

```bash
cd ~/tenderduty
docker run -d \
  --name tenderduty \
  -p 8888:8888 -p 28686:28686 \
  --restart unless-stopped \
  -v $(pwd)/config.yml:/var/lib/tenderduty/config.yml \
  ghcr.io/blockpane/tenderduty:latest
```

View logs:

```bash
docker logs -f --tail 20 tenderduty
```

***

### 6. Access the Dashboard

Find your public IP and open the dashboard in your browser:

```bash
echo -e "\033[0;32mhttp://$(wget -qO- eth0.me):8888/\033[0m"
```

Example:\
`http://45.159.231.171:8888/`

***

### 7. Setting Up Alerts

#### Discord Integration

1. Go to your Discord server → **Server Settings → Integrations → Webhooks**
2. Create a new Webhook and copy its URL
3. Paste the Webhook URL into the `discord_webhook` field of your `config.yml`
4. Restart TenderDuty:

```bash
docker restart tenderduty
```

Now your validator alerts will be delivered to your Discord channel.

***

#### Telegram Integration

1. Open Telegram and message **@BotFather**
2. Create a new bot using `/newbot`, set a name and username (ending with “bot”)
3. Save the generated **API token**
4. To find your Telegram ID or group ID:
   * Add the bot to your group
   * Message **@JsonViewBot** and send any message — it will return your ID
5. Add your `telegram_bot_token` and `telegram_chat_id` to `config.yml`
6. Restart TenderDuty again:

```bash
docker restart tenderduty
```

***

### 8. Useful Docker Commands

```bash
# List containers
docker ps

# Show logs
docker logs -f tenderduty

# Restart the service
docker restart tenderduty

# Stop container
docker stop tenderduty

# Remove container
docker rm tenderduty

# List images
docker images
```

***

### 9. Example RPC Extraction

If you’re running your own node, you can extract its public RPC port with:

```bash
NODE_FOLDER=".your_node_folder"
echo -e "\033[0;32mhttp://$(wget -qO- eth0.me)$(grep -A 3 "\[rpc\]" ~/$NODE_FOLDER/config/config.toml | egrep -o ":[0-9]+")\033[0m"
```

***

### 10. Summary

TenderDuty v2 is an essential part of validator infrastructure monitoring.\
It helps ensure validator uptime, catch signing issues early, and maintain reliability.\
Running it with properly configured alerts allows immediate response to downtime, missed blocks, or RPC failures — keeping your validator in active and secure operation.
