HTTP Endpoint Monitoring
Monitor the health and availability of your HTTP endpoints
HTTP Endpoint Monitoring
Metoro’s HTTP Endpoint Monitoring allows you to monitor the health and availability of your HTTP APIs and web services. You can configure monitors to regularly check your endpoints and track their response times and status.
Features
- Flexible Status Code Matching: Support for exact matches (e.g.,
200
), wildcards (e.g.,2XX
), and multiple patterns (e.g.,200,201,X04
) - Response Body Validation: Validate response bodies against regular expressions
- Custom Headers: Add custom headers to your requests
- Multiple HTTP Methods: Support for GET, POST, PUT, PATCH, and DELETE
- Request Body: Include request bodies for POST, PUT, and PATCH requests
Configuration Options
Basic Settings
- Monitor Name: A descriptive name for your monitor
- Check Type: Select “HTTP” for HTTP endpoint monitoring
- Endpoint URL: The complete URL to monitor (including
http://
orhttps://
) - HTTP Method: The HTTP method to use (GET, POST, PUT, PATCH, DELETE)
- Check Frequency: How often to check the endpoint
Status Code Validation
You can specify expected status codes using:
- Exact codes:
200
- Wildcards:
2XX
(any 2XX status) You must use uppercase for wildcards. - Multiple patterns:
200,201,X04
Examples:
200
: Expect exactly 200 OK2XX
: Accept any successful responseX00
: Accept any status code ending in 00200,201,202
: Accept any of these specific codes
Response Body Validation
You can optionally validate the response body using regular expressions. This is useful for:
- Ensuring specific content is present
- Validating response format
- Checking for error messages
Example patterns:
.*"status":"healthy".*
: Check for a healthy status in JSON^OK$
: Expect exactly “OK”version: [0-9]+\.[0-9]+\.[0-9]+
: Match a semantic version number
Headers
Add custom headers to your requests. Some common use cases:
- Authentication tokens
- API keys
- Content type specifications
For POST/PUT requests, the Content-Type
header is automatically set to application/json
.
Request Body
For POST, PUT, and PATCH requests, you can specify a request body to send with each check.
Example HTTP Monitor Configuration
Here’s an example configuration for monitoring a REST API:
- Monitor Name: API Health Check
- Check Type: HTTP
- Endpoint URL: https://api.example.com/health
- HTTP Method: GET
- Check Frequency: Every 1 minute
- Expected Status Code: 200
- Response Body Regex: .“status”:“healthy”.
- Headers:
- Authorization: Bearer token123
- Accept: application/json
This monitor will check the API health endpoint every minute, verify it returns a 200 status code, and confirm the response contains a “healthy” status.