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
apiNotifierConfigslist in theconfig.jsonfile:{
"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
apiUrlfield specifies the URL to send the notifications to. The bot will send the notifications as POST requests to the/api/agent/botAlertendpoint. -
The
apiKeyis sent in the header underx-apikey. Thelevelfield specifies the minimum level of alerts to send. If thelevelfield is omitted, the bot will default it todanger. -
The agent bot can send notifications as POST requests to the endpoint
apiUrl/api/agent/botAlertwith 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
/eventsand selectingSubscribe to Events. -
Add the following configuration to the
apiNotifierConfigslist in theconfig.jsonfile, replacingAPI_KEYwith 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
dangerandcriticallevels, regardless of the configured level. This is enforced by the Telegram bot, which delivers priority messages due to heavy load.