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
or (and) set node\'s archive ttl to lower value.""",
47
51
6*HOUR
48
52
),
49
53
"low_efficiency": Alert(
50
54
"high",
51
-
"""Validator efficiency is low: {efficiency}%.""",
55
+
"Validator had efficiency less than 90% in the validation round",
56
+
"""Validator efficiency is less than 90%: <b>{efficiency}%</b>.""",
52
57
VALIDATION_PERIOD//3
53
58
),
54
59
"out_of_sync": Alert(
55
60
"critical",
56
-
"Node is out of sync on {sync} sec.",
61
+
"Node is out of sync on more than 20 sec",
62
+
"Node is out of sync on more than 20 sec: <b>{sync} sec</b>.",
57
63
300
58
64
),
59
65
"service_down": Alert(
60
66
"critical",
67
+
"Node is not running (service is down)",
61
68
"validator.service is down.",
62
69
300
63
70
),
64
71
"adnl_connection_failed": Alert(
65
72
"high",
73
+
"Node is not answering to ADNL connection",
66
74
"ADNL connection to node failed",
67
75
3*HOUR
68
76
),
69
77
"zero_block_created": Alert(
70
78
"critical",
79
+
f"Validator has not created any blocks in the {int(VALIDATION_PERIOD//3//3600)} hours",
71
80
"Validator has not created any blocks in the last {hours} hours.",
72
81
VALIDATION_PERIOD//3
73
82
),
74
83
"validator_slashed": Alert(
75
84
"high",
85
+
"Validator has been slashed in the previous validation round",
76
86
"Validator has been slashed in previous round for {amount} TON",
77
87
FREEZE_PERIOD
78
88
),
79
89
"stake_not_accepted": Alert(
80
90
"high",
81
91
"Validator's stake has not been accepted",
92
+
"Validator's stake has not been accepted",
82
93
ELECTIONS_START_BEFORE
83
94
),
84
95
"stake_accepted": Alert(
85
96
"info",
97
+
"Validator's stake has been accepted (info alert with no sound)",
86
98
"Validator's stake {stake} TON has been accepted",
87
99
ELECTIONS_START_BEFORE
88
100
),
89
101
"stake_returned": Alert(
90
102
"info",
91
-
"Validator's stake {stake} TON has been returned on address {address}. The reward amount is {reward} TON.",
103
+
"Validator's stake has been returned (info alert with no sound)",
104
+
"Validator's stake {stake} TON has been returned on address <code>{address}</code>. The reward amount is {reward} TON.",
92
105
60
93
106
),
94
107
"stake_not_returned": Alert(
95
108
"high",
96
-
"Validator's stake has not been returned on address {address}.",
109
+
"Validator's stake has not been returned",
110
+
"Validator's stake has not been returned on address <code>{address}.</code>",
97
111
60
98
112
),
99
113
"voting": Alert(
100
114
"high",
115
+
"There is an active network proposal that has many votes (more than 50% of required) but is not voted by the validator",
101
116
"Found proposals with hashes `{hashes}` that have significant amount of votes, but current validator didn't vote for them. Please check @tonstatus for more details.",
102
117
VALIDATION_PERIOD
103
118
),
@@ -115,18 +130,19 @@ def __init__(self, ton, local, *args, **kwargs):
self.local.add_log(f"Error while sending welcome message: {e}", "error")
272
+
self.local.add_log(f"If you want the bot to write to a multi-person chat group, make sure the bot is added to that chat group. If it is not - do it and run the command `setup_alert_bot <bot_token> <chat_id>` again.", "info")
273
+
color_print("setup_alert_bot - {red}Error{endc}")
274
+
275
+
defsend_welcome_message(self):
276
+
message=f"""
277
+
This is alert bot. You have connected validator with ADNL <code>{self.ton.GetAdnlAddr()}</code>.
278
+
279
+
I don't process any commands, I only send notifications.
280
+
281
+
Current notifications enabled:
282
+
283
+
"""
284
+
foralertinALERTS.values():
285
+
message+=f"- {alert.description}\n"
286
+
287
+
message+="""
288
+
If you want, you can disable some notifications in mytonctrl by the <a href="https://docs.ton.org/v3/guidelines/nodes/maintenance-guidelines/mytonctrl-private-alerting#endisbling-alerts"> instruction</a>.
289
+
290
+
Full bot documentation <a href="https://docs.ton.org/v3/guidelines/nodes/maintenance-guidelines/mytonctrl-private-alerting">here</a>.
0 commit comments