Proactive Monitoring

Autonomous sentinel that watches endpoints, scrapes pages, polls APIs, and monitors inboxes — pushing alerts to Telegram, Slack, and Teams when conditions change.

Autonomous Background Sentinel

A 60-second background worker continuously evaluates monitoring jobs without any LLM cost. Redis distributed locking ensures exactly-once execution across multiple agent instances, while SHA-256 content hashing detects even the smallest page changes.

  • 4 check types: health_check, web_scrape, api_poll, email_check
  • 60-second tick cycle with 15-second startup delay
  • Redis distributed lock prevents duplicate execution across instances
  • SHA-256 diff detection for content change monitoring
// Create a monitoring job
POST /api/v1/agent/monitors
{
  "name": "DatOps Health",
  "checkType": "health_check",
  "target": "https://www.datops.ai/health",
  "intervalMinutes": 5,
  "conditions": {
    "statusCode": 200,
    "responseTimeMs": 3000,
    "bodyContains": "ok"
  },
  "maxConsecutiveAlerts": 5
}

// Worker cycle: every 60s
// → Redis lock (EX 120, NX)
// → batch 10 due jobs
// → execute checks
// → push alerts on failure

Multi-Channel Push Alerts

When a check fails or detects a change, alerts are pushed directly to your messaging channels via Redis reverse mapping chains. No polling required — you get notified instantly.

  • 4 alert types: CHECK FAILED, CONDITION NOT MET, CHANGE DETECTED, NEW EMAIL
  • Spam protection via configurable maxConsecutiveAlerts
  • pushAlertWithAction creates automatic diagnosis tasks
  • Per-user chatId isolation across Telegram, Slack, and Teams
// Alert flow
Monitor check fails
  → telegramNotifier.pushAlert()
  → Redis reverse mapping chain:
    dat:telegram:reverse:{agentDid}
    → telegramId
    → dat:telegram:mapping:{telegramId}
    → chatId

// Alert types with emoji
🔴 CHECK FAILED — endpoint down
🟡 CONDITION NOT MET — status != 200
🔵 CHANGE DETECTED — SHA-256 diff
📧 NEW EMAIL — inbox match

// Smart alerts
pushAlertWithAction()
  → sends alert message
  → creates diagnosis task automatically

Email Inbox Monitoring

The email_check type monitors connected inboxes for new messages matching your conditions. Uses seen_message_ids Redis Sets for deduplication — no false alerts from read-state changes or inbox reorganization.

  • seen_message_ids Redis Set prevents duplicate notifications
  • Routes to correct provider: Microsoft Graph, Gmail API, or IMAP
  • Filter by sender, subject, unread status, or folder
  • UNREAD marker filtering for precise inbox monitoring
// Email inbox monitor
POST /api/v1/agent/monitors
{
  "name": "Client Emails",
  "checkType": "email_check",
  "target": "microsoft",
  "intervalMinutes": 2,
  "conditions": {
    "from": "[email protected]",
    "subject": "urgent",
    "unreadOnly": true,
    "maxCount": 10
  }
}

// Diff detection:
// Redis Set: dat:monitor:seen_emails:{jobId}
// New message IDs → alert
// Already-seen IDs → skip
// No false alerts from read-state changes
60s
Cycle Time
4
Check Types
3
Alert Channels
SHA-256
Diff Detection

Always-On Agent Intelligence

Let your agent watch the world and alert you when things change.