Agent Bot Notifications
The agent bot can send notifications to a Telegram bot or API endpoint. It helps monitor the health of the agent and the network.
Agent Bot Notifications Configuration
-
Add the following configuration to the
apiNotifierConfigs
list in theconfig.json
file:{
"apiUrl": "NOTIFICATIONS_API_URL",
"apiKey": "API_KEY",
"level": "danger"
}If the level field is omitted inside configuration, the bot will default it to
danger
. -
The
apiUrl
field specifies the URL to send the notifications to. The bot will send the notifications as POST requests to the/api/agent/botAlert
endpoint. -
The
apiKey
is sent in the header underx-apikey
. Thelevel
field specifies the minimum level of alerts to send. If thelevel
field is omitted, the bot will default it todanger
. -
The agent bot can send notifications as POST requests to the endpoint
apiUrl/api/agent/botAlert
with the following body:PostAlert = {
bot_type: string,
address: string,
level: string,
title: string,
description: string,
};
Flare Hosted Telegram Notifications Alert Configuration
-
Get the API key from the FAssets Telegram Bot by sending
/events
and selectingSubscribe to Events
. -
Add the following configuration to the
apiNotifierConfigs
list in theconfig.json
file, replacingAPI_KEY
with the key obtained from the bot.{
"apiUrl": "https://fasset-tg-bot-songbird.flare.network",
"apiKey": "API_KEY",
"level": "danger"
}Notifications will only be sent out for
danger
andcritical
levels, regardless of the configured level. This is enforced by the Telegram bot, which delivers priority messages due to heavy load.