Charli3 Node Operators can now configure alerts to monitor their nodes more effectively. This guide explains how to set up and customize these alerts.
Alerts are configured in the dynamic_config.yml
file. Here's an example configuration:
Alerts:
cooldown: 1800 # 30 minutes (Optional)
thresholds: # (Optional)
c3_token_balance: 100
ada_balance: 500
timeout_variance: 120
minimum_data_sources: 3
notifications: # at least one notification is required
- type: slack
config:
webhook_url: "{tokenA}/{tokenB}/{tokenC}"
- type: discord
config:
webhook_url: "{WebhookID}/{WebhookToken}"
- type: telegram
config:
bot_token: your_bot_token
chat_id: your_chat_id
cooldown
: Time (in seconds) between repeated alerts of the same type.thresholds
: Customize alert trigger thresholds:c3_token_balance
: Minimum C3 token balance (in whole tokens)ada_balance
: Minimum ADA balance (in Ada)timeout_variance
: Percentage to adjust timeout thresholdsminimum_data_sources
: Minimum number of active data sources
notifications
: Configure one or more notification services
The notifications
section is crucial and requires at least one notification service to be configured. Here's a breakdown of the syntax for each supported service:
notifications: # at least one notification is required
- type: slack
config:
webhook_url: "{tokenA}/{tokenB}/{tokenC}"
- type: discord
config:
webhook_url: "{WebhookID}/{WebhookToken}"
- type: telegram
config:
bot_token: your_bot_token
chat_id: your_chat_id
- Each notification service is defined as a list item (
-
) undernotifications
. - The
type
field specifies the service (slack, discord, or telegram). - The
config
section contains service-specific settings:- For Slack and Discord: provide the
webhook_url
- For Telegram: provide both
bot_token
andchat_id
- For Slack and Discord: provide the
You can configure multiple notification services by adding more list items with different types and configurations.
- Slack: Provide the webhook URL from Slack
- Discord: Provide the webhook URL from Discord
- Telegram: Provide the bot token and chat ID
- Low C3 Token Balance
- Low ADA Balance
- Aggregation Timeout
- Node Update Timeout
- Insufficient Data Sources
- Create a Slack App for your workspace
- Enable Incoming Webhooks
- Create a new webhook and copy the URL
- Add the webhook URL to your config as
{tokenA}/{tokenB}/{tokenC}
- In your Discord server, go to Server Settings > Integrations
- Create a new webhook and copy the URL
- Add the webhook URL to your config as
{WebhookID}/{WebhookToken}
- Create a new bot using BotFather on Telegram
- Get the bot token from BotFather
- Start a chat with your bot and get the chat ID
- Add the bot token and chat ID to your config
Adjust the thresholds
section in the config to customize when alerts are triggered. If not specified, default values will be used.
After setting up your alerts, restart your node to apply the new configuration. You can temporarily lower the thresholds to test if alerts are working correctly.
The min_requirement
parameter in the Rate section of config.yml
affects the behavior of the "Insufficient Data Sources" alert. Here's how it works:
- If
min_requirement
is set tofalse
, the alert logic is adjusted as follows:- The alert will not be triggered if the number of active data sources is less than the default threshold (3) but greater than 0.
- The alert will still be triggered if there are no active data sources (0).
- If
min_requirement
istrue
or not specified, the current alert behavior is maintained, and the alert will be triggered if the number of active data sources is less than the default threshold (3).
This allows for more flexible alerting based on the specific requirements of your node operation.