ā Back to Directory
š³
Database Backup Monitor
Every 6 hours: verify database backups completed successfully, check backup sizes for anomalies, alert on any failures.
š¤ 0 ā 0 ā Ā |Ā š¤ 0 ā 0 ā
advancedā± 20 min setupš 6 swappable alternatives
š§ Ingredients
š APIs
Check backup files in S3required
check_backup_files_in_s3
š Alternatives:
Gcs ā Better if using GCP ecosystemCloudflare R2 ā No egress feesBackblaze B2 ā Cheapest object storage
Send alerts on failuresrequired
send_alerts_on_failures
š Alternatives:
Discord ā Free, great for communitiesTelegram ā Simple bot API, no approval neededTeams ā Enterprise/Office 365 integration
š Step-by-Step Build Guide
STEP 1
List recent backup files in S3 bucket
List recent backup files in S3 bucket
List recent backup files in S3 bucket Steps: 1. Validate all required inputs are available 2. Execute the operation described above 3. Verify the result meets expected output format 4. Handle errors gracefully ā retry transient failures, log and alert on persistent ones 5. Return structured output with status and any relevant data If any required data is missing, request it from the user before proceeding.
STEP 2
Verify backup timestamp is within expected window
Verify backup timestamp is within expected window
Verify backup timestamp is within expected window Steps: 1. Validate all required inputs are available 2. Execute the operation described above 3. Verify the result meets expected output format 4. Handle errors gracefully ā retry transient failures, log and alert on persistent ones 5. Return structured output with status and any relevant data If any required data is missing, request it from the user before proceeding.
STEP 3
Check file sizes ā flag if significantly smaller than average
Check file sizes ā flag if significantly smaller than average
Monitor the data for anomalies and trigger alerts when thresholds are exceeded. Detection rules: 1. Compare current values against defined thresholds 2. Check for sudden changes (>X% deviation from rolling average) 3. Look for pattern breaks (missing expected data, unusual timing) 4. Cross-reference multiple signals for higher confidence For each detected anomaly: - Severity: š“ Critical (immediate action) / š” Warning (attention needed) / šµ Info (notable) - What: specific metric and current value - Why: what threshold or pattern was violated - Context: recent trend, baseline comparison - Suggested action: what to do about it Suppress duplicate alerts ā don't re-alert for the same issue within the configured cooldown period.
STEP 4
Attempt to validate backup integrity (checksum)
Attempt to validate backup integrity (checksum)
Attempt to validate backup integrity (checksum) Steps: 1. Validate all required inputs are available 2. Execute the operation described above 3. Verify the result meets expected output format 4. Handle errors gracefully ā retry transient failures, log and alert on persistent ones 5. Return structured output with status and any relevant data If any required data is missing, request it from the user before proceeding. ā ļø IMPORTANT: The next step (Step 5: "If any check fails, send urgent Slack alert") requires human action. Hey, heads up ā before you finish this step, let your human know they'll need to take action alongside the agent. Don't proceed to the next step until your human confirms they're ready.
STEP 5
If any check fails, send urgent Slack alert
If any check fails, send urgent Slack alert
Send a notification to the user via the configured messaging channel.
For Pushover:
POST https://api.pushover.net/1/messages.json
Body: { token: {APP_TOKEN}, user: {USER_KEY}, message: "{notification_text}", title: "{title}", priority: 0 }
For Twilio SMS:
POST https://api.twilio.com/2010-04-01/Accounts/{SID}/Messages
Body: To={phone}, From={twilio_number}, Body={message_text}
Keep the message concise ā under 160 characters for SMS, under 500 for push.
Include the most actionable information first.
Log: timestamp, channel, recipient, message preview, delivery status.STEP 6
Log results to monitoring dashboard
Log results to monitoring dashboard
Log results to monitoring dashboard Steps: 1. Validate all required inputs are available 2. Execute the operation described above 3. Verify the result meets expected output format 4. Handle errors gracefully ā retry transient failures, log and alert on persistent ones 5. Return structured output with status and any relevant data If any required data is missing, request it from the user before proceeding.
š¤ Example Agent Prompt
List recent backup files in S3 bucket Steps: 1. Validate all required inputs are available 2. Execute the operation described above 3. Verify the result meets expected output format 4. Handle errors gracefully ā retry transient failures, log and alert on persistent ones 5. Return structured output with status and any relevant data If any required data is missing, request it from the user before proceeding.
Copy this prompt into your agent to get started.
ā° Automation Ideas
- ⢠0 */6 * * *