Skip to content

Commit b9c4199

Browse files
committed
do not send wallet address in alerts if not validator
1 parent 6fdba7a commit b9c4199

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

modules/alert_bot.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def init_alerts():
3131
"low_wallet_balance": Alert(
3232
"low",
3333
"Validator's wallet balance is less than 10 TON",
34-
"Validator's wallet {wallet} balance is less than 10 TON: {balance} TON.",
34+
"Validator's wallet <code>{wallet}</code> balance is less than 10 TON: {balance} TON.",
3535
18 * HOUR
3636
),
3737
"db_usage_80": Alert(
@@ -165,8 +165,12 @@ def send_alert(self, alert_name: str, *args, **kwargs):
165165
166166
Hostname: <code>{self.hostname}</code>
167167
Node IP: <code>{self.ip}</code>
168-
ADNL: <code>{self.adnl}</code>
169-
Wallet: <code>{self.wallet}</code>
168+
ADNL: <code>{self.adnl}</code>'''
169+
170+
if self.ton.using_validator():
171+
text += f"\nWallet: <code>{self.wallet}</code>"
172+
173+
text += f'''
170174
Time: <code>{time_}</code> (<code>{int(time.time())}</code>)
171175
Alert name: <code>{alert_name}</code>
172176
Severity: <code>{alert.severity}</code>

0 commit comments

Comments
 (0)