Health checks automatically monitor your deployed applications, alerting you when something goes wrong and providing insights into your application’s uptime.
What are Health Checks?
Health checks periodically send requests to your application to verify it’s running correctly. If your application stops responding, you’ll know immediately.
Setting Up a Health Check
Open your project
Navigate to the project you want to monitor
Go to Monitoring tab
Click on the Monitoring tab
Find Health Check section
Scroll to the Health Check card
Click Enable Health Check
Click the button to configure your health check
Configure settings
Set your endpoint, method, and timing
Save
Click Create to start monitoring
Configuration Options
| Setting | Description | Default |
|---|
| Endpoint | The URL path to check (e.g., /health) | / |
| HTTP Method | GET, POST, etc. | GET |
| Check Interval | How often to check (in seconds) | 60 |
| Timeout | How long to wait for a response (in seconds) | 10 |
| Enabled | Whether the health check is active | true |
Choosing an Endpoint
Create a dedicated health check endpoint in your application:
// Express.js example
app.get('/health', (req, res) => {
res.status(200).json({ status: 'healthy' });
});
# Flask example
@app.route('/health')
def health():
return {'status': 'healthy'}, 200
// Go example
http.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte(`{"status":"healthy"}`))
})
A good health check endpoint should verify critical dependencies (database connections, cache, etc.) and return quickly.
Viewing Health Check Results
Health Check History
The monitoring tab shows a chart of your health check history:
- Response Time - How long each check took
- Health Status - Healthy (green) or Unhealthy (red)
- Time Range - Filter by last 10 minutes to last 90 days
Time Range Options
| Range | Description |
|---|
| Last 10 minutes | Real-time monitoring |
| Last 1 hour | Recent activity |
| Last 24 hours | Daily overview |
| Last 7 days | Weekly trends |
| Last 30 days | Monthly patterns |
| Last 90 days | Long-term history |
Health Status
Your application’s health is determined by the response:
| Status | Condition |
|---|
| Healthy | Returns 2xx status code within timeout |
| Unhealthy | Returns error status or times out |
Managing Health Checks
Editing a Health Check
- Go to the Monitoring tab
- Click on the health check card
- Update your settings
- Click Update
Disabling a Health Check
Toggle the Enabled switch to pause monitoring without deleting the configuration.
Deleting a Health Check
- Open the health check settings
- Click Delete
- Confirm the deletion
Best Practices
Create a Dedicated Endpoint
Don’t use your homepage. Create a /health or /healthz endpoint that:
- Returns quickly (under 1 second)
- Checks critical dependencies
- Returns a consistent response format
Check Dependencies
A comprehensive health check might verify:
app.get('/health', async (req, res) => {
try {
// Check database connection
await db.ping();
// Check cache connection
await redis.ping();
res.json({
status: 'healthy',
database: 'connected',
cache: 'connected'
});
} catch (error) {
res.status(503).json({
status: 'unhealthy',
error: error.message
});
}
});
Set Appropriate Intervals
| Application Type | Recommended Interval |
|---|
| Critical production | 30-60 seconds |
| Standard production | 60-120 seconds |
| Staging/Development | 300 seconds |
Set Realistic Timeouts
Your timeout should be:
- Long enough for your endpoint to respond normally
- Short enough to detect actual problems
- Typically 5-30 seconds depending on your application
Troubleshooting
Health Check Always Failing
- Verify the endpoint path is correct
- Make sure the endpoint returns a 2xx status
- Check that your application is running
- Review application logs for errors
Intermittent Failures
- Increase the timeout value
- Check for resource constraints
- Monitor response times for patterns
- Look for cold start issues
Response Times Increasing
This might indicate:
- Growing database queries
- Memory leaks
- Increased load
- External dependency slowdowns