Creating Monitors
Monitors are the core of PixoMonitor. They regularly check your services and alert you when something goes wrong. This guide covers all 10 monitor types and how to configure each one.
Monitor Types Overview
| Type | Use Case | Example |
|---|---|---|
| HTTP/HTTPS | Websites, APIs, webhooks | https://api.example.com/health |
| TCP | Database ports, mail servers | Port 5432 on your database server |
| DNS | DNS record verification | Check that example.com resolves to the correct IP |
| SSL Certificate | Certificate expiration | Get alerts 30 days before expiry |
| Heartbeat | Cron jobs, scheduled tasks | Verify backups run daily |
| Domain Expiry | Domain name expiration | Get alerts before domain expires |
| Transaction | Multi-step workflows | Login → Navigate → Verify content |
| Cron Job | Expected scheduled runs | Verify jobs run on schedule |
| WebSocket | Real-time connections | Check WebSocket endpoints |
Common Settings
All monitor types share these configuration options:
- Name — A descriptive name for the monitor (max 100 characters)
- Interval — How often to run checks (30-300 seconds, depending on plan)
- Timeout — How long to wait before considering a check failed (5-30 seconds)
- Alert Cooldown — Minimum time between repeated alerts (1-60 minutes)
- Failure Threshold — Number of consecutive failures before alerting (1-10)
Set a failure threshold of 2-3 to avoid false alarms from temporary network issues.
HTTP/HTTPS Monitors
HTTP monitors check that a URL returns a successful response. This is the most common monitor type for websites and APIs.
Configuration Options
| Option | Description | Default |
|---|---|---|
| URL | The full URL to monitor | Required |
| Interval | Check frequency (30-300 seconds) | 60s |
| Timeout | Request timeout (5-30 seconds) | 10s |
| Expected Status | HTTP status code to expect | 200-299 |
| JSON Path | JSONPath expression to validate | Optional |
| JSON Value | Expected value at JSON path | Optional |
Basic HTTP Monitor
Enter the URL
Enter the full URL including the protocol (http:// or https://):
https://api.example.com/health
Set the interval
Choose how often to check. For critical services, use shorter intervals (30-60 seconds). For less critical services, 3-5 minutes is usually sufficient.
Configure response validation
By default, any 2xx status code is considered successful. For more control, you can:
- Expect a specific status code (e.g., 200)
- Validate JSON response content using JSONPath
JSON Response Validation
For API endpoints that return JSON, you can validate specific fields:
- Expected JSON Path:
$.statusor$.data.healthy - Expected JSON Value:
"ok"ortrue
Example: To verify that {"status": "healthy"} is returned, set:
- JSON Path:
$.status - JSON Value:
healthy
JSON validation uses JSONPath syntax. Common patterns:
$.key— Top-level key$.data.nested— Nested key$.items[0].name— Array element
TCP Monitors
TCP monitors check that a port is open and accepting connections. Use these for databases, mail servers, and other non-HTTP services.
Configuration Options
| Option | Description | Example |
|---|---|---|
| Host | Server hostname or IP | db.example.com |
| Port | TCP port number | 5432 |
| Interval | Check frequency | 60s |
| Timeout | Connection timeout | 10s |
Common TCP Monitoring Use Cases
- PostgreSQL — Port 5432
- MySQL — Port 3306
- Redis — Port 6379
- MongoDB — Port 27017
- SMTP — Port 25 or 587
- SSH — Port 22
TCP monitors only verify that the port accepts connections. They don't authenticate or run queries. For database monitoring, consider adding an HTTP health endpoint.
DNS Monitors
DNS monitors verify that DNS records are resolving correctly. Use these to detect DNS hijacking or configuration issues.
Configuration Options
| Option | Description |
|---|---|
| Hostname | Domain to resolve (e.g., example.com) |
| Record Type | A, AAAA, CNAME, MX, TXT, etc. |
| Expected Value | The value the record should resolve to |
Example DNS Monitor
To verify that example.com resolves to 93.184.216.34:
- Set hostname to
example.com - Set record type to
A - Set expected value to
93.184.216.34
If you use a CDN or load balancer with multiple IPs, DNS monitors may report false failures. Consider monitoring HTTP endpoints instead.
SSL Certificate Monitors
SSL monitors track certificate expiration and alert you before certificates expire. This helps prevent "Not Secure" warnings for your users.
Configuration Options
| Option | Description | Default |
|---|---|---|
| URL | HTTPS URL to check | Required |
| Warning Days | Days before expiry to alert | 30 days |
How It Works
- PixoMonitor connects to your HTTPS endpoint
- Retrieves the SSL certificate details
- Checks the expiration date
- Alerts when fewer than the warning threshold days remain
Set warning days to at least 14-30 days to give yourself time to renew certificates before they expire.
Heartbeat Monitors
Heartbeat monitors work in reverse — your service pings PixoMonitor instead of PixoMonitor pinging your service. This is perfect for cron jobs, scheduled tasks, and batch processes.
How Heartbeat Monitors Work
- Create a heartbeat monitor to get a unique URL
- Add a request to that URL at the end of your script
- If PixoMonitor doesn't receive a ping within the expected interval, you're alerted
Configuration Options
| Option | Description | Range |
|---|---|---|
| Heartbeat Interval | Expected time between pings | 30s - 24h |
| Grace Period | Extra time before alerting | 60s - 24h |
Example: Monitoring a Cron Job
For a backup script that runs daily at 2 AM:
- Create a heartbeat monitor with a 24-hour interval
- Get the unique heartbeat URL (e.g.,
https://pixomonitor.com/api/heartbeat/abc123) - Add a curl request at the end of your backup script:
#!/bin/bash
# backup.sh
pg_dump mydb > /backups/mydb.sql
curl -fsS --retry 3 https://pixomonitor.com/api/heartbeat/abc123Set the grace period to handle slight timing variations. For a daily job, a 1-2 hour grace period is reasonable.
Domain Expiry Monitors
Domain expiry monitors track when your domain names will expire. Get alerts before you lose critical domains.
Configuration Options
| Option | Description | Default |
|---|---|---|
| Domain | Domain name to check | Required |
| Warning Days | Days before expiry to alert | 30 days |
How It Works
PixoMonitor queries WHOIS data to check the domain expiration date and alerts you when the domain is approaching expiration.
Some domain registrars may rate-limit WHOIS queries. Domain checks typically run once per day regardless of your monitor interval setting.
Transaction Monitors
Transaction monitors (also called synthetic monitoring) run multi-step browser tests. Use these to verify user workflows like login, checkout, or sign-up processes.
Available Actions
| Action | Description | Required Fields |
|---|---|---|
navigate | Go to a URL | value (URL) |
click | Click an element | selector |
type | Enter text into a field | selector, value |
wait | Wait for time (ms) | value (milliseconds) |
assert_text | Verify text exists | selector, value |
assert_element | Verify element exists | selector |
screenshot | Take a screenshot | None |
Example: Login Flow
To verify users can log in to your application:
[
{ "action_type": "navigate", "value": "https://app.example.com/login" },
{ "action_type": "type", "selector": "#email", "value": "test@example.com" },
{ "action_type": "type", "selector": "#password", "value": "testpassword" },
{ "action_type": "click", "selector": "button[type=submit]" },
{ "action_type": "wait", "value": "2000" },
{ "action_type": "assert_text", "selector": ".welcome", "value": "Welcome" }
]Transaction monitors use real browser automation. Use test accounts and avoid modifying production data.
Cron Job Monitors
Cron job monitors verify that scheduled tasks run on their expected schedule. Unlike heartbeat monitors, you define the expected cron expression upfront.
Configuration Options
| Option | Description |
|---|---|
| Cron Expression | Standard cron format (e.g., 0 2 * * *) |
| Grace Period | Extra seconds before alerting (60-86400) |
Cron Expression Format
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6, Sunday = 0)
│ │ │ │ │
* * * * *
Common Cron Expressions
| Expression | Meaning |
|---|---|
0 * * * * | Every hour |
0 2 * * * | Daily at 2 AM |
0 0 * * 0 | Weekly on Sunday at midnight |
0 0 1 * * | Monthly on the 1st at midnight |
Cron job monitors calculate when the next run should occur based on your cron expression. If a heartbeat isn't received by that time plus the grace period, an alert is triggered.
WebSocket Monitors
WebSocket monitors verify that WebSocket endpoints are accessible and responding correctly.
Configuration Options
| Option | Description |
|---|---|
| URL | WebSocket URL (ws:// or wss://) |
| Send Message | Optional message to send after connecting |
| Expected Response | Expected response content (optional) |
How WebSocket Monitoring Works
- Establishes a WebSocket connection
- Optionally sends a configured message
- Optionally verifies the response matches expectations
- Considers the check successful if connection succeeds
WebSocket URLs must start with ws:// or wss:// (for secure connections).
Advanced Features
Multi-Location Monitoring
On paid plans, you can enable checks from multiple geographic locations. This helps detect region-specific outages and reduces false positives.
When enabled:
- Checks run from multiple regions simultaneously
- A monitor is only considered down if multiple locations report failures
- Response times are reported per-location
Anomaly Detection
PixoMonitor can automatically detect performance anomalies by learning your service's normal response time patterns.
- Sensitivity — How many standard deviations from the mean trigger an anomaly (1.0-5.0)
- Baseline — Calculated from 7 days of data, requires at least 100 samples
Alert Cooldown
To prevent alert fatigue, configure a cooldown period between repeated alerts:
- Alert Cooldown Minutes — Minimum time between alerts (1-60 minutes)
- While in cooldown, PixoMonitor still tracks failures but doesn't send duplicate alerts
Escalation Policies
Link monitors to escalation policies to automatically escalate unacknowledged incidents to additional team members. See the Escalation Policies guide for details.
Best Practices
- Use descriptive names — Make it easy to identify what's being monitored
- Set appropriate intervals — More critical services warrant more frequent checks
- Configure failure thresholds — Avoid false alarms from temporary issues
- Monitor health endpoints — Create dedicated
/healthendpoints for monitoring - Use multiple monitor types — HTTP for the app, TCP for the database, SSL for certificates
- Test alert channels — Verify notifications work before relying on them
For critical services, create both HTTP and TCP monitors. The HTTP monitor verifies your application is responding, while the TCP monitor verifies the server is reachable.
