Files
goma-gateway/docs/quickstart/healthcheck.md

68 lines
1.1 KiB
Markdown
Raw Normal View History

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.
```yaml
version: 1.0
gateway:
routes:
- path: /cart
name: example route
rewrite: /
methods: []
healthCheck:
path: "/health/live"
interval: 30 # in Seconds
timeout: 10 # in Seconds
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": ""
}
]
}
```