This example monitors calls to a specific Algorand application and alerts when certain conditions are met.
-
Get Algorand node URLs:
- Algod URL: Usually
https://mainnet-api.algonode.cloud(public) or your own node - Indexer URL: Usually
https://mainnet-idx.algonode.cloud(public) or your own indexer
- Algod URL: Usually
-
Get a Slack webhook (optional): Create a Slack app and add an incoming webhook.
-
Set environment variables:
export ALGOD_URL="https://mainnet-api.algonode.cloud"
export ALGO_INDEXER_URL="https://mainnet-idx.algonode.cloud"
export SLACK_WEBHOOK_URL="https://hooks.slack.com/services/YOUR/WEBHOOK/URL"
export ALLOWED_SENDERS="ADDRESS1,ADDRESS2" # optional: filter by sender-
Update the app ID in
config.yamlto the application you want to monitor. -
Run:
watch-tower validate -c config.yaml
watch-tower run -c config.yaml --once- Monitors calls to a specific Algorand application
- Filters by sender addresses (if
ALLOWED_SENDERSis set) - Sends alerts to Slack
- Deduplicates alerts for 24 hours
Monitor a different app:
match:
type: app_call
app_id: 12345678 # Change to your app IDMonitor ASA transfers instead:
match:
type: asset_transfer
# No app_id needed for asset transfersAdd predicates:
where:
- "sender in env(ALLOWED_SENDERS)"
- "amount >= microAlgos(1000000)" # 1 ALGOTest with dry-run:
watch-tower run -c config.yaml --dry-run --onceUse AlgoExplorer or the Algorand indexer API to find application IDs:
curl "https://mainnet-idx.algonode.cloud/v2/applications?creator=ADDRESS"