hashicorp / hashicorp/consul

Unable to load metrics in topology view

Open
#12,403 8 comments 0 reactions 0 assignees View on GitHub
theme/ui type/question
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

### Overview of the Issue

Cannot setup metrics in topology view.
Configuration:
```yaml
ui_config:
enabled: true
metrics_provider: "prometheus"
metrics_proxy:
base_url: "https://victoria-metrics.service.consul"
dashboard_url_templates:
service: !unsafe "https://grafana.service.consul/d/{{Service.Meta.dashboard}}"

```

When I enable debug logs and click on generated queries from the log it works fine. For example:
```
> curl -sS 'https://victoria-metrics.service.consul/api/v1/query?query=histogram_quantile(0.5%2C%20sum%20by(le%2Cconsul_source_service%2Cconsul_source_datacenter%2Cconsul_source_namespace)%20(rate(envoy_cluster_upstream_rq_time_bucket%7Bconsul_destination_service%3D%22victoria-metrics%22%2Cconsul_destination_datacenter%3D%22oikumene%22%2Cconsul_destination_namespace%3D%22default%22%7D%5B15m%5D)))&time=1645379365.739' | jq
```
```json
{
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"consul_source_datacenter": "oikumene",
"consul_source_namespace": "default",
"consul_source_service": "vmagent"
},
"value": [
1645379365.739,
"20.937829694377903"
]
}
]
}
}
```

Only unavailable from the consul ui.

### Reproduction Steps

1. Visit topology view

### Describe the solution you'd like

Metrics to be displayed in topology UI

### Consul Version

1.11.3

### Browser and Operating system details

chromium, gentoo, amd64
metrics database is VictoriaMetrics

### Screengrabs / Web Inspector logs
![image](https://user-images.githubusercontent.com/28529663/154857944-84b3a44e-abb2-495f-bca1-fcbccfca7247.png)
![image](https://user-images.githubusercontent.com/28529663/154857954-ee8be094-725e-4bb8-8273-b12dfa5bb922.png)
![image](https://user-images.githubusercontent.com/28529663/154857957-142b74dc-1393-42de-abf8-b20568846a89.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.