Enhance health check functionality and logging in POE project. Added detailed sensor status reporting to health check response, improved error handling during server startup, and updated logging format for better visibility. Adjusted health check parameters in Nomad configuration for increased stability and monitoring accuracy.

This commit is contained in:
Naab2k3
2025-06-23 10:00:08 +07:00
parent b1e111e3f4
commit cb0ab4c4d3
4 changed files with 83 additions and 15 deletions

View File

@ -29,8 +29,8 @@ job "poe-sensor" {
# Update strategy
update {
max_parallel = 1
min_healthy_time = "30s"
healthy_deadline = "3m"
min_healthy_time = "60s"
healthy_deadline = "5m"
progress_deadline = "10m"
auto_revert = true
canary = 0
@ -50,11 +50,12 @@ job "poe-sensor" {
check {
type = "http"
path = "/health"
interval = "30s"
timeout = "10s"
interval = "60s"
timeout = "15s"
initial_status = "passing"
check_restart {
limit = 3
grace = "10s"
limit = 2
grace = "15s"
}
}
}