Skip to content

[monitoring] /liveness?failon=degraded not returning HTTP 500 #8047

@andrewkroh

Description

@andrewkroh

According to the text in the elastic-agent.yml, the liveness endpoint should return HTTP 500 when a component is in the DEGRADED state. But I am seeing it return HTTP 200.

# # For example: `curl 'localhost:6792/liveness?failon=degraded'` will return 500 if a component is in a degraded state.

$ curl -w 'HTTP %{http_code}' 'http://localhost:6791/liveness?failon=degraded' HTTP 200 
$ elastic-agent status ┌─ fleet │ └─ status: (HEALTHY) Connected └─ elastic-agent ├─ status: (DEGRADED) 1 or more components/units in a degraded state └─ cel-default ├─ status: (HEALTHY) Healthy: communicating with pid '26' └─ cel-default-cel-ti_abusech-7d5f8550-1b5b-11ee-8ec2-15184cec64a8 └─ status: (DEGRADED) single event error object returned by evaluation: {"error":{"code":"402","id":"402 Payment Required","message":"POST:{\n \"query_status\": \"ratelimited\",\n \"msg\": \"Your request has been rate-limited. Please visit https:\\/\\/abuse.ch\\/rate-limit\\/ for more information.\"\n}"}} 
elastic-agent version Binary: 8.17.4 (build: 378c3e87685deb271aef538b708167fb458b51ba at 2025-03-20 12:08:33 +0000 UTC) Daemon: 8.17.4 (build: 378c3e87685deb271aef538b708167fb458b51ba at 2025-03-20 12:08:33 +0000 UTC) 

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions