nomad
nomad copied to clipboard
Nomad UI: Service Health visualisation for Consul provided health checks
Nomad version
1.4.1
Operating system and Environment details
Linux 3.10.0-1160.76.1.el7.x86_64 x86_64 (CentOS Linux release 7.9.2009 (Core))
Issue
With version 1.4.0 you introduced the ability to configure health checks for native Nomad services. This is also integrated into the UI with a nice visualisation of the history of the health-checks (by small green or red quadrandts).
However I would expect the same feature also when switching to consul as provider which is not the case:
Reproduction steps
Submit a job with health-checks and consul as provider (which is the default)
Expected Result
I expect to see the health-check of the service and it's visualisation over time in the service-details-panel also in the case that I use consul as service-provider
Job file (if appropriate)
See here an example Here is the job-file `job "fail-service" { datacenters = ["isys_poc"]
type = "service"
group "fail-service" { count = 1
network {
port "http" {
to = 8080
}
}
task "fail-service" {
driver = "docker"
config {
image = "thobe/fail_service:v0.0.12"
ports = ["http"]
}
service {
name = "${TASK}"
port = "http"
check {
name = "fail_service health using http endpoint '/health'"
port = "http"
type = "http"
path = "/health"
method = "GET"
interval = "10s"
timeout = "2s"
}
}
env {
HEALTHY_FOR = -1 # Stays healthy forever
}
resources {
cpu = 100 # MHz
memory = 256 # MB
}
}
} }`
Hi @fraenku and thanks for raising this issue. This is expected behaviour in the current Nomad context as neither the UI or the HTTP API understands how to proxy this type of request to the Consul API. There are also a number of configuration and scaling problems to understand and solve before having this sort of functionality.
The functionality within https://github.com/hashicorp/nomad/pull/14537 provided the ability to link out to the Consul UI if you have configured the UI block correctly.
I will mark this issue for further discussion as an enhancement, however, I do not believe this would be something that will be looked at in the near/medium time frame.
We have nomad jobs with multiple Consul services and being able to quickly visualise status would be handy.
Even if the status would only be the latest, the history is nice but less important.