Crypto Bot Failure Alert Configuration Turnkey

Crypto bot crashed at 3 AM. Missed 40 transactions. Or stuck on a single operation. You find out 8 hours later when you open your laptop. That's unacceptable. We know from experience: a missed alert once cost us 0.5 ETH on unexecuted orders. A 10-minute bot downtime during active trading can cost hu

Blockchain Development Services

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1308
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1269
  • image_logo-advance_0.webp
    B2B Advance company logo design
    719
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    1009
  • image_logo-aider_0.webp
    AIDER company logo development
    954
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1062

Crypto bot crashed at 3 AM. Missed 40 transactions. Or stuck on a single operation. You find out 8 hours later when you open your laptop. That's unacceptable. We know from experience: a missed alert once cost us 0.5 ETH on unexecuted orders. A 10-minute bot downtime during active trading can cost hundreds of dollars. Our alert setup pays for itself many times over. A proper system addresses three classes of problems. First, process crash. Second, performance degradation: the bot runs but slowly or misses events. Third, business anomalies: no transactions for 2 hours — could be normal, or the network went down. Our approach: configure alerts so you know about a problem before it hits your wallet.

How Heartbeat Monitoring Prevents Loss of Funds

An average crypto bot processes dozens of transactions per hour. One hour of downtime with a 50-block lag can cost thousands in lost profit or liquidity. Without alerts, you don't see:

  • WebSocket connection drop — bot 'works' but receives no events
  • Stuck transaction handler — queue blocked, other operations fail
  • Insufficient gas (ETH/SOL) — bot stops sending its own transactions
  • Slow RPC provider — increased latency, growing lag

We address these with three monitoring levels: heartbeat, performance metrics, and business anomalies.

What Alert Architecture We Use

We build the system on the dead man's switch principle: the bot periodically sends an "I'm alive" signal, an external service detects the absence of that signal. In parallel, we add alerts on key business metrics.

Healthcheck endpoint + external monitoring

The most reliable approach: the bot calls an external healthcheck service (Healthchecks.io, Better Stack, or a custom endpoint) every 30 seconds. If no signal arrives within 2 minutes — alert.

// Heartbeat every 30 seconds class BotHealthReporter { private lastProcessedBlock: number = 0; private processedCount: number = 0; startHeartbeat(): void { setInterval(async () => { const payload = { status: 'ok', lastBlock: this.lastProcessedBlock, processed: this.processedCount, timestamp: Date.now(), rpcLatency: await this.measureRpcLatency(), }; // Ping Healthchecks.io or Better Stack await fetch(process.env.HEALTHCHECK_PING_URL!, { method: 'POST', body: JSON.stringify(payload), }).catch(() => {}); }, 30_000); } } 

Healthchecks.io is a simple dead man's switch service with a free tier for 5 projects. It works 2 times faster than self-hosted polling on the same server.

Why Chain Lag Check Is Important

The bot may technically work but process blocks with delay due to slow RPC or overloaded handler. We add a lag check:

async function checkChainLag(provider: JsonRpcProvider, lastProcessed: number): Promise<void> { const currentHead = await provider.getBlockNumber(); const lag = currentHead - lastProcessed; if (lag > 10) alerter.sendAlert('warning', `Lag: ${lag} blocks`); if (lag > 50) alerter.sendAlert('critical', `Critical delay: ${lag} blocks`); // Metric for Grafana metrics.gauge('bot_chain_lag_blocks', lag); } 

Gas Wallet Balance Alert

Gas wallet balance is a common cause of sudden stops. We monitor it in real time:

async function checkGasBalance(provider: JsonRpcProvider, botAddress: string): Promise<void> { const balance = await provider.getBalance(botAddress); const balanceEth = parseFloat(formatEther(balance)); if (balanceEth < 0.05) { await alerter.sendAlert('warning', `Low gas wallet balance: ${balanceEth.toFixed(4)} ETH\nAddress: ${botAddress}` ); } if (balanceEth < 0.01) { await alerter.sendAlert('critical', `CRITICAL: gas wallet nearly empty: ${balanceEth.toFixed(4)} ETH — bot will stop soon` ); } } 

Process Supervisor: Auto-Restart

If the bot crashes, it should automatically come back up. We configure PM2 for Node.js:

# ecosystem.config.js module.exports = { apps: [{ name: 'crypto-bot', script: 'dist/bot.js', restart_delay: 5000, max_restarts: 10, min_uptime: '10s', error_file: '/var/log/crypto-bot/error.log', out_file: '/var/log/crypto-bot/out.log', }] }; pm2 start ecosystem.config.js pm2 save 

PM2 itself sends notifications via pm2-notify or Keymetrics integration. On every restart we log and send an alert via Telegram.

Recommended Alert Thresholds

Alert Type Warning Threshold Critical Threshold Recommended Channel
Heartbeat 90 sec no signal 120 sec Telegram
Chain lag 10 blocks 50 blocks Telegram
Gas balance <0.05 ETH <0.01 ETH Telegram + Email
RPC latency >3 sec >5 sec Telegram

What's Included in the Work

The service includes:

  • Full audit of the bot's current architecture and identification of failure points
  • Healthcheck integration (Healthchecks.io / Better Stack) with heartbeat configuration
  • Addition of alerts for chain lag, gas balance, handler errors
  • Process supervisor setup (PM2/systemd) with auto-restart and logging
  • Notification channel connection (Telegram, PagerDuty, Slack, etc.)
  • Documentation for each alert type and response procedure
  • Test run with failure simulation
  • Two weeks of post-deployment support

Pricing starts at $199 for the basic setup.

Turnkey Setup Process

We perform alert configuration in several stages:

  1. Architecture audit — review current bot, failure points, metrics
  2. Channel selection — Telegram, PagerDuty, Slack, email (or combination)
  3. Healthcheck integration — implement heartbeat and configure external service (Healthchecks.io / Better Stack / custom)
  4. Business alert configuration — lag, gas, error handler, process supervisor
  5. Test run — simulate failures: disconnect RPC, drain gas, throw exceptions
  6. Documentation and training — hand over monitoring access, describe actions for each alert type
Stage Duration What You Get
Audit and planning 1-2 hours Failure point diagram, alert list
Healthcheck + code 2-4 hours Heartbeat, Telegram bot, logs
Supervisor setup 30 minutes PM2 with auto-restart and alerts
Testing 1-2 hours Test protocol, bug fixes
Project handover 1 hour Access, documentation, recommendations

Timeline: 1 to 3 days depending on bot complexity and number of integrations.

Why Choose Us

We have 5+ years of experience developing and supporting trading bots on Ethereum, Polygon, BNB Chain, and Solana. Delivered over 50 projects. We don't just set up notifications — we design a fault-tolerant system that minimizes losses.

We guarantee: after our setup, you'll know about any problem within 2 minutes, and the bot will automatically recover from 9 out of 10 crashes.

Final Alert Checklist

  • Heartbeat missing > 2 minutes → critical alert
  • Lag from chain head > 50 blocks → critical alert
  • Gas wallet balance < 0.05 ETH → warning
  • N consecutive handler errors → critical alert
  • Process restarted → informational alert
  • RPC latency > 5 seconds → warning

Want the same system for your bot? Get a consultation. Contact us — we will assess your project for free.

Our crypto bot failure alert system is designed to keep you informed. We monitor every critical metric. With our service, you can trade with confidence.