[ Thanos ][ Sidecar ] No connection to started Prometheus
Revision | Date | Description |
|---|---|---|
| 24.07.2024 | Init Changelog |
Problem
When report Incident
Only if all Prometheus Instances on K8s Cluster not working (Prometheus Server with Thanos Sidecar should work in HA mode as default).
Severity | Value | Time |
|---|---|---|
SEV-3 | None of Prometheus Server Pod not working on K8s Cluster. |
Escalation
I Line | II Line | III Line |
|---|---|---|
|
|
Requires access / logs, etc.
Panel
Kubernetes API (with
kubectl,k9s, etc.) access:Needs at least:
LIST,GET,WATCHonpods,pods/logs,statefulsetsinmonitoringNamespace.
Monitoring
Logs
Pods:
Prometheus Server
Environment
Every Kubernetes Cluster.
DB
None.
Steps to take
Verify logs on thanos-sidecar container to investigate problem and take action.
Possible problems:
Thanos has changed configuration and it is not working.
Prometheus has changed configuration and it is not working.
Prometheus has problems and cannot start.
Solution: Connection Refused
Make sure that prometheus is running while thanos is started. The
connection_refusedstates that there is no server running in thelocalhost:9090, which is the address for prometheus in this case.
Solution: Thanos not identifying Prometheus
Thanos requires unique
external_labelsfor further processing. So make sure that theexternal_labelsare not empty and globally unique in the prometheus config file.