Create a health check
A health check is a dedicated monitoring request that pings your HTTP share to confirm it's operational.
This guide shows you how to create a health check for an existing HTTP share.
Prerequisites
You need an HTTP share created before you can create a health check. See Getting started with Frontdoor for more info.
Steps
- Frontdoor console
- Command-line interface
-
From the Frontdoor console, click Health Checks in the left-hand menu.
-
Click the + icon to create a new health check
-
Fill in the required fields:
- Name: Enter a name for the health check.
- Share name: Select an existing HTTP share.
- Endpoint: Select the endpoint to monitor.
- HTTP method: Choose the HTTP method (
GET,POST, etc.) for the health check request.- For most use cases,
GETis appropriate. This verifies that the resource is accessible.
- For most use cases,
- Expected HTTP response: Specify the expected HTTP response code (e.g.,
200).- For most use cases,
200is appropriate. This means the server successfully processed the request.
- For most use cases,
- Timeout period: Set the timeout period in seconds.
-
Click Test to verify the health check configuration.
-
Click Create to save the health check.
Request example:
curl -s -X POST \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "homepage-check",
"method": "GET",
"path": "/",
"expectedStatus": 200
}' \
https://gateway.production.netfoundry.io/frontdoor/3d6d2b6e-6c7a-4a7f-8c3d-9a9d2e1f0b1c/health-checks
Response example:
{
"id": "hc-1",
"name": "homepage-check",
"enabled": true
}