Closed B3ns44d closed 4 months ago
Well, I've found this endpoint and it seems like the health endpoint for Gravitee components, and I've created this script to make it easy to perform health checks with Docker:
#!/bin/sh
username="admin"
password="adminadmin"
url="http://localhost:18083/_node/health"
log() {
echo "$(date +"%Y-%m-%d %T") - $1"
}
log "Fetching health check data from $url"
result=$(curl -f -s -u "${username}:${password}" "${url}")
if [ $? -ne 0 ]; then
log "Error: Failed to fetch health data"
exit 1
fi
check_component_health() {
component=$1
health_status=$(echo "$result" | jq -r ".[\"${component}\"]|.healthy")
if [ "$health_status" != "true" ]; then
log "Component $component is not healthy"
return 1
else
log "Component $component is healthy"
fi
}
if check_component_health "management-repository" &&
check_component_health "gravitee-apis" &&
check_component_health "repository-analytics"; then
log "All components are healthy"
exit 0
else
log "One or more components are unhealthy"
exit 1
fi
ref: https://docs.gravitee.io/apim/1.x/apim_installguide_management_api_technical_api.html
Feature Myabe?
feature-myabe
feature-myabe
As a SRE
I want to have a dedicated health check endpoint (
/health
) in thegraviteeio/apim-management-api
API containerSo that I can easily monitor the health and status of the API management system in Docker, Kubernetes, and other environments.
Additional information
additional-information
additional-information
Acceptance criteria
acceptance-criteria
acceptance-criteria
graviteeio/apim-management-api
API container is running, when a GET request is made to the/health
endpoint, then it should respond with HTTP 200 OK if the system is healthy.Developer sub-tasks
developer-sub-tasks
developer-sub-tasks
/health
endpoint in the API.