Skip to content

Uptime Monitors

Uptime monitors proactively check your services from 9n9s infrastructure by making requests to your endpoints and validating responses. They provide external monitoring to ensure your services are accessible and functioning correctly from your users’ perspective.

  1. Configure Target: Specify the URL or endpoint to monitor
  2. Set Frequency: Choose how often to check (every 30 seconds to 1 hour)
  3. Define Assertions: Set criteria for what constitutes a successful check
  4. Monitor Results: 9n9s tracks response times, status codes, and validation results
  5. Get Alerts: Receive notifications when checks fail or assertions don’t pass
  • Website Monitoring: Ensure your website is accessible and loading correctly
  • API Health Checks: Monitor REST APIs, GraphQL endpoints, and microservices
  • Service Endpoints: Check databases, caches, and internal services
  • SSL Certificate Monitoring: Track certificate expiration dates
  • Third-Party Dependencies: Monitor external services your application depends on
  • CDN and Load Balancer Health: Ensure global infrastructure is responding
  • Monitor from outside your infrastructure
  • Detect issues before your users do
  • Validate end-to-end functionality
  • Test from multiple geographic regions (coming soon)
  • Status code checking (200, 404, 5xx ranges)
  • Response time monitoring with thresholds
  • Content validation with regex patterns
  • JSON/XML response structure validation
  • HTTP header verification
  • SSL/TLS certificate monitoring
  • Custom HTTP methods (GET, POST, PUT, DELETE)
  • Custom headers and authentication
  • Request body for POST/PUT requests
  • Timeout configuration
  • User-agent customization
  • Response time tracking and trends
  • Uptime percentage calculations
  • Historical performance data
  • SLA compliance reporting
StateDescription
UpAll assertions passing, service responding correctly
DownOne or more assertions failing or service unreachable
PausedMonitoring temporarily disabled
  1. Create Monitor: Use the web interface to create your first uptime monitor
  2. Enter URL: Specify the endpoint to monitor (e.g., https://api.example.com/health)
  3. Set Frequency: Choose check interval (e.g., every 1 minute)
  4. Configure Assertions: Define success criteria (status code, response time, content)
  5. Start Monitoring: Activate the monitor and begin receiving checks
# Example configuration
name: "Company Homepage"
url: "https://company.com"
frequency: "1m"
timeout: "10s"
assertions:
- type: "STATUS_CODE"
operator: "EQUALS"
value: "200"
- type: "RESPONSE_TIME"
operator: "LESS_THAN"
value: "2000" # 2 seconds
- type: "RESPONSE_BODY"
operator: "CONTAINS"
value: "Welcome"
name: "API Health Endpoint"
url: "https://api.example.com/health"
method: "GET"
headers:
Authorization: "Bearer token123"
Content-Type: "application/json"
frequency: "30s"
assertions:
- type: "STATUS_CODE"
operator: "EQUALS"
value: "200"
- type: "JSON_CONTENT"
path: "$.status"
operator: "EQUALS"
value: "healthy"
- type: "RESPONSE_TIME"
operator: "LESS_THAN"
value: "1000"

Validate HTTP response status codes:

# Exact match
- type: "STATUS_CODE"
operator: "EQUALS"
value: "200"
# Range matching
- type: "STATUS_CODE"
operator: "IN"
value: "2xx" # Any 2xx status code
# Multiple acceptable codes
- type: "STATUS_CODE"
operator: "IN"
value: ["200", "201", "202"]

Monitor performance and set SLA thresholds:

# Maximum response time
- type: "RESPONSE_TIME"
operator: "LESS_THAN"
value: "1500" # milliseconds
# Minimum response time (detect cache issues)
- type: "RESPONSE_TIME"
operator: "GREATER_THAN"
value: "10"

Validate response body content:

# Text contains
- type: "RESPONSE_BODY"
operator: "CONTAINS"
value: "success"
# Text does not contain
- type: "RESPONSE_BODY"
operator: "NOT_CONTAINS"
value: "error"
# Regex pattern matching
- type: "RESPONSE_BODY"
operator: "MATCHES_REGEX"
value: "User ID: \\d+"

Validate structured JSON responses:

# JSONPath validation
- type: "JSON_CONTENT"
path: "$.status"
operator: "EQUALS"
value: "ok"
# Nested object validation
- type: "JSON_CONTENT"
path: "$.data.users[0].active"
operator: "EQUALS"
value: true
# Array length validation
- type: "JSON_CONTENT"
path: "$.items.length()"
operator: "GREATER_THAN"
value: 0

Validate HTTP response headers:

# Header exists and contains value
- type: "RESPONSE_HEADER"
header: "Content-Type"
operator: "CONTAINS"
value: "application/json"
# Security header validation
- type: "RESPONSE_HEADER"
header: "X-Frame-Options"
operator: "EQUALS"
value: "DENY"

Monitor certificate expiration:

# Certificate expires in more than 14 days
- type: "TLS_CERT_EXPIRY"
operator: "MORE_THAN_DAYS"
value: "14"
# Certificate is valid
- type: "TLS_CERT_VALID"
operator: "EQUALS"
value: true

Monitor POST/PUT endpoints with custom payloads:

name: "User Registration API"
url: "https://api.example.com/users"
method: "POST"
headers:
Content-Type: "application/json"
Authorization: "Bearer test-token"
body: |
{
"username": "test-user",
"email": "[email protected]",
"test": true
}
assertions:
- type: "STATUS_CODE"
operator: "EQUALS"
value: "201"
- type: "JSON_CONTENT"
path: "$.user.id"
operator: "EXISTS"

Support various authentication schemes:

# Bearer token
headers:
Authorization: "Bearer {{env.API_TOKEN}}"
# Basic authentication
headers:
Authorization: "Basic {{base64(username:password)}}"
# API key in header
headers:
X-API-Key: "{{env.API_KEY}}"
# API key in query parameter
url: "https://api.example.com/data?api_key={{env.API_KEY}}"

Use environment variables for sensitive data:

headers:
Authorization: "Bearer {{env.PRODUCTION_API_TOKEN}}"
X-Client-ID: "{{env.CLIENT_ID}}"

E-commerce Product API:

name: "Product Catalog API"
url: "https://store.example.com/api/products/featured"
assertions:
- type: "STATUS_CODE"
operator: "EQUALS"
value: "200"
- type: "JSON_CONTENT"
path: "$.products.length()"
operator: "GREATER_THAN"
value: 5
- type: "JSON_CONTENT"
path: "$.products[0].price"
operator: "EXISTS"
- type: "RESPONSE_TIME"
operator: "LESS_THAN"
value: "800"

Payment Gateway Health:

name: "Payment Gateway Status"
url: "https://payments.example.com/v1/status"
headers:
Authorization: "Bearer {{env.PAYMENT_API_KEY}}"
assertions:
- type: "STATUS_CODE"
operator: "EQUALS"
value: "200"
- type: "JSON_CONTENT"
path: "$.services.payment_processing"
operator: "EQUALS"
value: "operational"
- type: "JSON_CONTENT"
path: "$.services.fraud_detection"
operator: "EQUALS"
value: "operational"
- type: "TLS_CERT_EXPIRY"
operator: "MORE_THAN_DAYS"
value: "30"

Monitor and track response times over time:

  • Real-time Alerts: Get notified when response times exceed thresholds
  • Historical Trends: View performance trends and identify degradation
  • Percentile Analysis: Track 95th and 99th percentile response times
  • SLA Reporting: Monitor compliance with performance SLAs

Understand how uptime is calculated:

  • Success Rate: Percentage of successful checks over time period
  • Availability Windows: Different calculations for business hours vs 24/7
  • Maintenance Exclusions: Exclude planned maintenance from calculations
  • Custom SLA Periods: Define your own measurement windows

Set Appropriate Frequencies:

  • Critical APIs: Every 30 seconds to 1 minute
  • Websites: Every 1-2 minutes
  • Internal services: Every 2-5 minutes
  • Background services: Every 5-15 minutes

Use Realistic Timeouts:

  • Fast APIs: 5-10 seconds
  • Complex queries: 15-30 seconds
  • File uploads/downloads: 60+ seconds
  • Consider worst-case scenarios

Configure Meaningful Assertions:

  • Always check status codes
  • Set reasonable response time thresholds
  • Validate critical content or data structure
  • Monitor SSL certificate expiration

Protect Sensitive Data:

  • Use environment variables for API keys and tokens
  • Avoid hardcoding credentials in configurations
  • Rotate API keys regularly
  • Use read-only or limited-scope tokens when possible

Monitor Endpoints Safely:

  • Use dedicated health check endpoints when available
  • Avoid monitoring endpoints that modify data
  • Consider rate limiting implications
  • Use appropriate User-Agent headers

Gradual Escalation:

  • Start with email/Slack for initial alerts
  • Escalate to SMS/PagerDuty for sustained issues
  • Use different thresholds for different severity levels
  • Consider business hours vs. after-hours alerting

Reduce False Positives:

  • Set grace periods for temporary network issues
  • Use multiple assertions to confirm real problems
  • Consider maintenance windows and scheduled downtime
  • Monitor trends rather than just individual failures
# Production
name: "API - Production"
url: "https://api.example.com/health"
frequency: "30s"
tags: ["production", "api", "critical"]
# Staging
name: "API - Staging"
url: "https://staging-api.example.com/health"
frequency: "2m"
tags: ["staging", "api"]
# Development
name: "API - Development"
url: "https://dev-api.example.com/health"
frequency: "5m"
tags: ["development", "api"]
# User Service
name: "User Service Health"
url: "https://users.api.example.com/health"
assertions:
- type: "JSON_CONTENT"
path: "$.database.status"
value: "connected"
# Order Service
name: "Order Service Health"
url: "https://orders.api.example.com/health"
assertions:
- type: "JSON_CONTENT"
path: "$.dependencies.payment_gateway"
value: "healthy"
# Main Application
name: "PWA - Main App"
url: "https://app.example.com"
assertions:
- type: "STATUS_CODE"
value: "200"
- type: "RESPONSE_BODY"
operator: "CONTAINS"
value: "manifest.json"
# Service Worker
name: "PWA - Service Worker"
url: "https://app.example.com/sw.js"
assertions:
- type: "STATUS_CODE"
value: "200"
- type: "RESPONSE_HEADER"
header: "Content-Type"
operator: "CONTAINS"
value: "javascript"

High Response Times:

  • Check server resource utilization
  • Analyze database query performance
  • Review network latency and routing
  • Consider CDN configuration

Intermittent Failures:

  • Look for patterns in failure timing
  • Check for rate limiting or throttling
  • Review load balancer health checks
  • Investigate DNS resolution issues

SSL Certificate Warnings:

  • Verify certificate chain completeness
  • Check certificate expiration dates
  • Ensure proper domain name matching
  • Validate certificate authority trust

Review check details for failed assertions:

  1. Response Details: Status code, headers, body content
  2. Timing Information: DNS lookup, connection, response times
  3. Error Messages: Specific assertion failures and reasons
  4. Network Path: Trace route and connection details