← Back to Directory
🍳

Uptime Monitor

Every 5 minutes: ping your endpoints, measure response times, alert on downtime, maintain uptime log with SLA tracking.

🤖 00 ↓  |  👤 00
intermediate10 min setup🔄 5 swappable alternatives

🧂 Ingredients

🔌 APIs

alert_on_downtime

🔄 Alternatives:

Discord Free, great for communitiesTelegram Simple bot API, no approval neededTeams Enterprise/Office 365 integration

post_status_updates

🔄 Alternatives:

Slack Professional team notificationsTelegram Simple, no approval needed

📋 Step-by-Step Build Guide

STEP 1

Load endpoints from uptime-config.json

Load endpoints from uptime-config.json

Load endpoints from uptime-config.json

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

HTTP GET each endpoint, record status code and response time

HTTP GET each endpoint, record status code and response time

HTTP GET each endpoint, record status code and response time

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

If any endpoint is down (non-2xx or timeout), send immediate alert

If any endpoint is down (non-2xx or timeout), send immediate 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 4

If a previously-down endpoint recovers, send recovery notice

If a previously-down endpoint recovers, send recovery notice

If a previously-down endpoint recovers, send recovery notice

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 5

Append results to uptime-log.csv

Append results to uptime-log.csv

Persist the data to the configured storage.

Data structure:
- Include timestamp (ISO 8601) with every record
- Use consistent field names across entries
- Store raw values (not formatted) for future analysis
- Add a source/origin field for audit trail

Storage operation:
1. Validate the data before writing
2. Check for duplicates (by timestamp + unique key)
3. Append to existing records — never overwrite
4. Verify the write succeeded
5. Return the stored record ID/reference
STEP 6

Calculate rolling 30-day uptime percentage

Calculate rolling 30-day uptime percentage

Process the data and calculate the requested metrics.

Steps:
1. Validate input data — check for nulls, out-of-range values, duplicates
2. Apply the calculation/aggregation logic
3. Compare against benchmarks or previous periods if available
4. Format results with appropriate precision (2 decimal places for percentages, whole numbers for counts)

Include: current value, previous value, change (absolute and %), trend direction (↑↓→).
Flag any anomalies: values >2 standard deviations from the mean.

If insufficient data for a reliable calculation, state the minimum needed and return partial results.

🤖 Example Agent Prompt

Load endpoints from uptime-config.json

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

  • */5 * * * *