Skip to main content

Monitor

Create and manage uptime monitors for websites, APIs, and services
3 min read

The Monitor resource allows you to create and manage uptime monitoring checks in Better Uptime.

Example Usage#

Basic HTTP Monitor#

API Endpoint Monitor#

Monitor with Expected Status#

Monitor with Keyword Check#

Monitor with Custom Headers#

SSL Certificate Monitor#

Monitor with Policy#

Ping Monitor#

Port Monitor#

Monitor with Maintenance Windows#

Argument Reference#

Required Arguments#

  • url (String) - The URL, IP address, or host to monitor
  • monitorType (String) - Type of monitor. Options: status, expected_status_code, keyword, keyword_absence, ping, tcp, udp, smtp, pop, imap, ssl

Optional Arguments#

  • checkFrequency (Number) - Check frequency in seconds. Options: 30, 60, 120, 180, 300, 600, 1800, 3600, 86400. Default: 180
  • requestTimeout (Number) - Request timeout in seconds (1-60). Default: 15
  • confirmationPeriod (Number) - Confirmation period in seconds before marking as down. Default: 0
  • monitorGroupId (Number) - Monitor group ID
  • pronounceableName (String) - Pronounceable name for phone calls
  • paused (Boolean) - Whether the monitor is paused. Default: false
  • port (Number) - Port number (for TCP/UDP monitors)
  • regions (List) - Regions to check from (e.g., ["us", "eu", "as"])
  • expectedStatusCodes (List) - Expected HTTP status codes (for expected_status_code type)
  • requiredKeyword (String) - Required keyword in response (for keyword type)
  • call (Boolean) - Enable phone call notifications. Default: false
  • sms (Boolean) - Enable SMS notifications. Default: false
  • email (Boolean) - Enable email notifications. Default: true
  • push (Boolean) - Enable push notifications. Default: true
  • policyId (Number) - Escalation policy ID
  • requestHeaders (List) - Custom HTTP headers
  • requestBody (String) - HTTP request body (for POST requests)
  • followRedirects (Boolean) - Follow HTTP redirects. Default: false
  • rememberCookies (Boolean) - Remember cookies between checks. Default: false
  • verifySSL (Boolean) - Verify SSL certificates. Default: true
  • maintenanceFrom (String) - Maintenance window start time (ISO 8601)
  • maintenanceTo (String) - Maintenance window end time (ISO 8601)
  • maintenanceTimezone (String) - Maintenance window timezone

Attribute Reference#

  • id (String) - The monitor ID
  • status (String) - Current monitor status (up, down, paused, maintenance)
  • createdAt (String) - Creation timestamp
  • updatedAt (String) - Last update timestamp

Monitor Types#

HTTP Monitors#

status - Checks if URL returns 2xx status code

expected_status_code - Checks for specific status codes

keyword - Checks if response contains keyword

keyword_absence - Checks if response doesn't contain keyword

Network Monitors#

ping - ICMP ping check

tcp - TCP port check

udp - UDP port check

Email Monitors#

smtp - SMTP server check

pop - POP3 server check

imap - IMAP server check

SSL Monitor#

ssl - SSL certificate expiration check

Best Practices#

Check Frequency Guidelines#

Service TypeRecommended FrequencyReason
Critical API30-60 secondsImmediate detection
Public Website60-180 secondsBalance cost/detection
Internal Service180-300 secondsReduced load
SSL Certificates86400 seconds (daily)Infrequent changes

Timeout Configuration#

Confirmation Period#

Regional Monitoring#

Import#

Monitors can be imported using their ID:

Troubleshooting#

Monitor Shows Down but Service is Up#

Causes:

  • Firewall blocking Better Uptime IPs
  • Geographic restrictions
  • Rate limiting

Solution:

  • Whitelist Better Uptime IP ranges
  • Adjust geographic restrictions
  • Increase rate limits

False Positives#

Causes:

  • Network instability
  • Service intermittent issues
  • Too short timeout

Solution:

SSL Verification Failures#

Cause: Self-signed certificates or certificate issues

Solution: