← 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_s3

šŸ”„ Alternatives:

Gcs — Better if using GCP ecosystemCloudflare R2 — No egress feesBackblaze B2 — Cheapest object storage

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 * * *