2024-11-09 15:06:09 +01:00
|
|
|
---
|
|
|
|
|
title: Healthcheck
|
|
|
|
|
layout: default
|
|
|
|
|
parent: Quickstart
|
2024-11-10 08:15:47 +01:00
|
|
|
nav_order: 5
|
2024-11-09 15:06:09 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Healthcheck
|
|
|
|
|
|
|
|
|
|
Goma comes with routes healthcheck, that can be enabled and disabled.
|
|
|
|
|
|
2024-11-10 17:47:05 +01:00
|
|
|
```yaml
|
|
|
|
|
version: 1.0
|
|
|
|
|
gateway:
|
|
|
|
|
routes:
|
|
|
|
|
- path: /cart
|
|
|
|
|
name: example route
|
|
|
|
|
rewrite: /
|
|
|
|
|
methods: []
|
|
|
|
|
healthCheck:
|
|
|
|
|
path: "/health/live"
|
2024-11-12 13:26:14 +01:00
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
2024-11-10 17:47:05 +01:00
|
|
|
healthyStatuses: [200,404] # Healthy statuses
|
|
|
|
|
```
|
2024-11-09 15:06:09 +01:00
|
|
|
|
|
|
|
|
- Goma Gateway healthcheck: `/health/live`
|
|
|
|
|
- Routes health check: `health/routes`
|
|
|
|
|
|
|
|
|
|
### Gateway healthcheck response:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"name": "Service Gateway",
|
|
|
|
|
"status": "healthy",
|
|
|
|
|
"error": ""
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
### Routes healthcheck response:
|
|
|
|
|
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"status": "healthy",
|
|
|
|
|
"routes": [
|
|
|
|
|
{
|
|
|
|
|
"name": "order-service",
|
|
|
|
|
"status": "healthy",
|
|
|
|
|
"error": ""
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "notification-service",
|
|
|
|
|
"status": "healthy",
|
|
|
|
|
"error": ""
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "store-service",
|
|
|
|
|
"status": "healthy",
|
|
|
|
|
"error": ""
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "account-service",
|
|
|
|
|
"status": "healthy",
|
|
|
|
|
"error": ""
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
```
|