You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ecosystem/node/mytonctrl/alerting.mdx
+27-10Lines changed: 27 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,88 +1,105 @@
1
-
## MyTonCtrl alerting commands
2
-
3
-
The alert-bot module integrates with Telegram to notify operators about node issues. The commands below help you configure, inspect, and test alerts.
1
+
---
2
+
title: "Alerts"
3
+
description: "The alert-bot module integrates with Telegram to notify operators about node issues. The commands below help you configure, inspect, and test alerts."
4
+
---
4
5
5
6
## Operational notes
7
+
6
8
- Alerts cover wallet balance thresholds, database usage, validator efficiency/blocks, synchronization, ADNL health, stake acceptance, slashes, and other key metrics. Review the alert keys in `modules/alert_bot.py` to understand the available triggers.
7
9
- Each alert has an associated cooldown (`timeout`) to prevent spam. Info-level ok alerts reset state without sound notifications.
8
10
- The bot requires network access to the Telegram API. Ensure outbound HTTPS is permitted from the server.
9
11
- When validator mode is enabled, the alert bot automatically includes wallet and ADNL context in messages. In collator-only or other modes, some alerts may be skipped because prerequisites are missing.
10
12
11
-
## setup_alert_bot
13
+
## setup\_alert\_bot
14
+
12
15
**Purpose:** Configure the alert bot with the Telegram bot token and chat ID, then start sending events.
13
16
14
17
**Syntax**
18
+
15
19
```mytonctrl
16
20
setup_alert_bot
17
21
```
18
22
19
23
**Behavior**
24
+
20
25
- Launches the alert-bot configuration flow (interactive prompts) to store `BotToken` and `ChatId` in the local database.
21
26
- Validates the token by sending test requests; fails fast if the bot or chat ID is incorrect.
22
27
- Should be run after enabling `alert-bot` mode so the background scheduler picks up the alerts.
23
28
29
+
## list\_alerts
24
30
25
-
## list_alerts
26
31
**Purpose:** Show all predefined alerts and whether they are currently enabled.
27
32
28
33
**Syntax**
34
+
29
35
```mytonctrl
30
36
list_alerts
31
37
```
32
38
33
39
**Behavior**
40
+
34
41
- Lists every alert key (for example: `low_wallet_balance`, `db_usage_80`, `out_of_sync`) along with the enabled flag and the UNIX timestamp when it was last sent.
35
42
- Helps you audit which alerts are muted and whether recent warnings have fired.
36
43
44
+
## enable\_alert
37
45
38
-
## enable_alert
39
46
**Purpose:** Re-enable a previously muted alert.
40
47
41
48
**Syntax**
49
+
42
50
```mytonctrl
43
51
enable_alert <alert_name>
44
52
```
45
53
46
54
**Behavior**
55
+
47
56
- Accepts any alert key defined in the alert module (for example: `low_efficiency`, `service_down`, `validator_slashed`).
48
57
- Sets the alert’s `enabled` flag to `true` so future events can trigger notifications.
49
58
50
59
**Example**
60
+
51
61
```mytonctrl
52
62
enable_alert low_wallet_balance
53
63
```
54
64
55
-
## disable_alert
65
+
## disable\_alert
66
+
56
67
**Purpose:** Temporarily suppress a specific alert.
57
68
58
69
**Syntax**
70
+
59
71
```mytonctrl
60
72
disable_alert <alert_name>
61
73
```
62
74
63
75
**Behavior**
76
+
64
77
- Marks the alert as disabled; the scheduler skips sending messages for it until re-enabled.
65
78
- Use when you expect noisy conditions (e.g., during planned maintenance) but still want other alerts to deliver.
66
79
67
80
**Example**
81
+
68
82
```mytonctrl
69
83
disable_alert service_down
70
84
```
71
85
72
-
## test_alert
86
+
## test\_alert
87
+
73
88
**Purpose:** Send a simple message through the configured alert channel to verify connectivity.
74
89
75
90
**Syntax**
91
+
76
92
```mytonctrl
77
93
test_alert
78
94
```
79
95
80
96
**Behavior**
97
+
81
98
- Requires successful initialization (bot token and chat ID saved). If initialization hasn’t run yet, the command triggers it.
82
99
- Sends `Test alert` with `info` severity so you can confirm the chat receives notifications.
83
100
84
-
85
101
### Available alert names
102
+
86
103
-`low_wallet_balance`: Validator wallet balance below 10 TON while the node is working and in sync.
87
104
-`low_wallet_balance_ok`: Balance recovered to ≥10 TON after a low-balance alert.
88
105
-`db_usage_80`: TON database usage exceeded 80% (but ≤95%).
@@ -95,7 +112,7 @@ test_alert
95
112
-`service_down_ok`: Validator service resumed normal operation after downtime.
96
113
-`adnl_connection_failed`: Remote ADNL connectivity checks failed for all probe hosts.
97
114
-`adnl_connection_ok`: ADNL check succeeded again after a failure.
98
-
-`zero_block_created`: No blocks produced in roughly the last half validation period (~8h on mainnet).
115
+
-`zero_block_created`: No blocks produced in roughly the last half validation period (\~8h on mainnet).
99
116
-`zero_block_created_ok`: Block production resumed after a zero-block alert.
100
117
-`validator_slashed`: Validator was slashed in the previous validation round.
101
118
-`stake_not_accepted`: Election stake submission was rejected (validator missing from current validator list).
Copy file name to clipboardExpand all lines: ecosystem/node/mytonctrl/backups.mdx
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,34 @@
1
-
## MyTonCtrl backup commands
1
+
---
2
+
title: "Backup"
3
+
description: "MyTonCtrl bundles helper scripts for creating and restoring node backups."
4
+
---
2
5
3
-
MyTonCtrl bundles helper scripts for creating and restoring node backups. These commands wrap the shell scripts located in `mytonctrl/scripts/` and handle temporary files, keyring exports, and user selection.
6
+
import { Aside } from"/snippets/aside.jsx";
4
7
5
-
<Warning>Exporting and restoring backups exposes private keys and validator configuration.
8
+
<Asidetype="caution">Exporting and restoring backups exposes private keys and validator configuration.
6
9
Risk: key leakage allows account takeover; config mistakes can halt validation.
7
10
Scope: this node’s keys and validator state.
8
11
Rollback: create a fresh backup first; you can restore it if needed.
9
-
Environment: test on TON Testnet before using on TON Mainnet.</Warning>
12
+
Environment: test on TON Testnet before using on TON Mainnet.</Aside>
10
13
11
14
## Operational notes
15
+
12
16
- Backups capture MyTonCtrl data, validator config, and keyring files. Always store backup archives securely (they contain private keys).
13
17
- Restoration overwrites existing configuration. Ensure the donor node is offline before restoring its backup to avoid data divergence.
14
18
- Both scripts expect `sudo` or equivalent privileges when manipulating system files. Use the `-u` flag to match the original install user if necessary.
15
19
16
-
## create_backup
20
+
## create\_backup
21
+
17
22
**Purpose:** Generate a compressed archive containing MyTonCtrl configuration, keyring, and validator data.
18
23
19
24
**Syntax**
25
+
20
26
```mytonctrl
21
27
create_backup [filename] [-u <user>]
22
28
```
23
29
24
30
**Behavior**
31
+
25
32
- Exports the validator keyring via `exportallprivatekeys`, captures the current `config.json`, and stages them in a temporary directory.
26
33
- Invokes `scripts/create_backup.sh` with:
27
34
-`-m` pointing to the MyTonCtrl working directory (usually `/var/ton-work`).
The BTC Teleport module manages the optional Bitcoin bridge (Teleport) client shipped with MyTonCtrl. Use these commands to inspect proposals, vote on them, or remove the Teleport installation when no longer needed.
1
+
---
2
+
title: "BTC Teleport"
3
+
description: "The BTC Teleport module manages the optional Bitcoin bridge (Teleport) client shipped with MyTonCtrl. Use these commands to inspect proposals, vote on them, or remove the Teleport installation when no longer needed."
4
+
---
4
5
5
6
## Operational notes
7
+
6
8
- Teleport installation happens automatically when validator mode is enabled unless `btcTeleportDisabled` is set. Use these commands to check governance participation or clean up.
7
9
- Voting attaches 1.5 TON from the validator wallet. Ensure the wallet has sufficient balance before sending votes.
8
10
- The module caches proposals it has voted on (`saveOffersBtcTeleport`) to avoid duplicate submissions.
9
11
10
-
## print_offers_btc_teleport_list
12
+
## print\_offers\_btc\_teleport\_list
13
+
11
14
**Purpose:** Show the current Teleport governance proposals and voting status.
12
15
13
16
**Syntax**
17
+
14
18
```mytonctrl
15
19
print_offers_btc_teleport_list [--json] [hash]
16
20
```
17
21
18
22
**Behavior**
23
+
19
24
- Queries the Teleport configurator contract and lists each proposal hash, the number of validators who have voted, approval percentage, and whether the proposal has passed.
20
25
- By default, hashes are trimmed (use the `hash` literal to see full values). Add `--json` to print the raw proposal dictionary.
21
26
22
27
**Examples**
28
+
23
29
```mytonctrl
24
30
print_offers_btc_teleport_list
25
31
print_offers_btc_teleport_list --json
26
32
print_offers_btc_teleport_list hash
27
33
```
28
34
29
-
## vote_offer_btc_teleport
35
+
## vote\_offer\_btc\_teleport
36
+
30
37
**Purpose:** Vote on one or more Teleport proposals using the validator wallet.
- Requires the node to be an active masterchain validator (validator index < `mainValidators`). Non-masterchain validators are skipped.
46
+
47
+
- Requires the node to be an active masterchain validator (validator index \<`mainValidators`). Non-masterchain validators are skipped.
39
48
- For each offer hash:
40
49
- Verifies that the proposal still exists and hasn’t already been voted on by this validator.
41
50
- Saves the offer locally, builds the vote request, signs it with the validator key, wraps it in a wallet transaction (1.5 TON attach), and submits it to the Teleport configurator.
42
51
- Outputs warnings for missing or already-voted offers and continues processing the rest.
43
52
44
53
**Example**
54
+
45
55
```mytonctrl
46
56
vote_offer_btc_teleport 0xabc123... 0xdef456...
47
57
```
48
58
49
-
## remove_btc_teleport
59
+
## remove\_btc\_teleport
60
+
50
61
**Purpose:** Uninstall the Teleport binaries, keystore, and system service.
51
62
52
63
**Syntax**
64
+
53
65
```mytonctrl
54
66
remove_btc_teleport [--force]
55
67
```
@@ -61,11 +73,13 @@ Rollback/Mitigation: reinstall Teleport or restore from a backup of `/usr/src/to
61
73
Environment: applies on both TON Testnet and TON Mainnet nodes.</Caution>
62
74
63
75
**Behavior**
76
+
64
77
- Runs `scripts/remove_btc_teleport.sh` to delete the Teleport repository (`/usr/src/ton-teleport-btc-periphery`), keystore, and systemd service.
65
78
- By default, refuses to run if the validator is currently a masterchain participant. Use `--force` only when the node is not producing masterchain blocks or after exiting the validator set.
0 commit comments