profile
viewpoint

Ask questionsconsul_autopilot_healthy metric is `NaN`

Overview of the Issue

After upgrading to 1.9, the metric consul_autopilot_healthy is NaN. Might be related to https://github.com/hashicorp/consul/issues/9208

image

The autopilot health endpoint reports the cluster is healthy.

image

Reproduction Steps

Steps to reproduce this issue, eg:

  1. Upgrade to 1.9
  2. Go to /v1/agent/metrics?format=prometheus

Operating system and Environment details

Linux AMD 64 running on Kubernetes

For additional context, this did not present itself in 1.9-beta1. It might be related to the changes introduced in https://github.com/hashicorp/consul/pull/9198

hashicorp/consul

Answer questions lawliet89

Thanks. You're right. 1 is only returned from a single instance which is the leader.

image

I went back to 1.8.4 to check and only the leader would return 1 and the rest of the agents would return nothing.

If this is expected, please close the issue, although this is a change in behaviour that might trip others up.

useful!
source:https://uonfu.com/
answerer
Yong Wen Chua lawliet89 Singapore ✔ Verified ex-student, sometimes a programmer/developer/engineer/geek.
Github User Rank List