Optimizing Check Budgets
Your check budget is shared across all checks, regions, and steps. This guide shows you how to maximize monitoring coverage while staying within budget.
How Budgets Work
Each check execution counts against your hourly budget:
- Single check, single region: 1 check per execution
- Single check, 5 regions: 5 checks per execution
- 5-step multistep, 3 regions: 15 checks per execution
Example: A check with 5 regions running every 10 minutes uses 30 checks/hour (5 regions × 6 executions/hr).
Strategy 1: Use Dependencies to Skip Unnecessary Checks
When a check has dependencies, it only runs if all dependencies are healthy. This saves budget when services are down.
Example: Health Check → Multistep Flow
Instead of running a complex multistep check every minute, set up a dependency chain:
# Step 1: Simple health check (runs every minute)
resource "quismon_check" "api_health" {
name = "API Health"
type = "https"
config = jsonencode({
url = "https://api.example.com/health"
})
regions = ["na-east-ewr"]
interval_seconds = 60
}
# Step 2: Complex flow (only runs when health passes)
resource "quismon_check" "checkout_flow" {
name = "Checkout Flow"
type = "multistep"
config = jsonencode({
steps = [
{ name = "login", type = "https", config = { url = "..." } },
{ name = "add-to-cart", type = "https", config = { url = "..." } },
{ name = "checkout", type = "https", config = { url = "..." } },
{ name = "payment", type = "https", config = { url = "..." } },
{ name = "confirm", type = "https", config = { url = "..." } }
]
})
regions = ["na-east-ewr", "eu-central-fra"]
interval_seconds = 300 # Every 5 minutes
depends_on = [quismon_check.api_health.id]
}
Budget Savings:
- Without dependency: 5 steps × 2 regions × 12/hr = 120 checks/hr
- With dependency (90% uptime): ~108 checks/hr
- When API is down: 0 checks wasted on the flow
Strategy 2: Optimize Region Selection
More regions = more budget. Choose regions strategically:
For Global Services
- Use 3-5 key regions covering major user bases
- NA (Newark), EU (Frankfurt), APAC (Singapore) covers most traffic
For Regional Services
- Use 1-2 regions near your infrastructure
- Add a distant region for latency comparison
Example Budget Impact
# 1 region: 1 check/execution
regions = ["na-east-ewr"]
# 5 regions: 5 checks/execution
regions = ["na-east-ewr", "na-west-lax", "eu-central-fra", "ap-southeast-sin", "sa-east-gru"]
# 31 regions: 31 checks/execution (use sparingly!)
regions = ["all"] # Not recommended for frequent checks
Strategy 3: Tune Check Intervals
Interval is the most impactful budget lever:
| Interval | Executions/Hour | Best For |
|---|---|---|
| 10 seconds | 360 | Critical health checks (Enterprise) |
| 30 seconds | 120 | Key APIs (Paid) |
| 60 seconds | 60 | Standard monitoring |
| 5 minutes | 12 | Complex flows, less critical |
| 15 minutes | 4 | SSL expiry, DNS checks |
| 1 hour | 1 | Daily health confirmation |
Strategy 4: Use Inverted Checks for Security
Inverted checks alert when something shouldn't be accessible. These are typically low-frequency:
resource "quismon_check" "admin_not_public" {
name = "Admin Panel Not Public"
type = "https"
config = jsonencode({
url = "https://example.com/admin"
expected_status = [401, 403, 404] # Should NOT return 200
})
inverted = true # Alert if it DOES return 200
regions = ["na-east-ewr"]
interval_seconds = 300 # Check every 5 minutes is enough
}
Quick Reference: Budget Math
Checks per hour = Regions × Steps × (3600 / Interval)
Examples:
- 1 region, 1 step, 60s interval = 1 × 1 × 60 = 60 checks/hr
- 3 regions, 5 steps, 300s interval = 3 × 5 × 12 = 180 checks/hr
- 5 regions, 1 step, 30s interval = 5 × 1 × 120 = 600 checks/hr
See Also
- Check Types - Available monitoring types
- Inverted Checks - Security monitoring pattern
- Multi-Step Checks - Complex workflow monitoring