Azure AppGateway - index out of range on MatchedCount
Closed this issue · 0 comments
Hi Guys
I'm having an issue when attempting to pull Metrics of an Azure Appgateway V2.
Specifically when pulling MatchedCount I get the following error:
panic: runtime error: index out of range
goroutine 31 [running]:
main.(*Collector).extractMetrics(0xd11b48, 0xc0000ff800, 0xc000280000, 0x2ba, 0xc000110640, >0x12e, 0xc0000449c0, 0x4, 0x4, 0xc8, ...)
C:/GoProjects/src/github.com/RobustPerception/azure_metrics_exporter/main.go:71 +0xd2d
main.(*Collector).batchCollectResources(0xd11b48, 0xc0000ff800, 0xc000044a40, 0x1, 0x1)
C:/GoProjects/src/github.com/RobustPerception/azure_metrics_exporter/main.go:130 +0x3a6
main.(*Collector).Collect(0xd11b48, 0xc0000ff800)
C:/GoProjects/src/github.com/RobustPerception/azure_metrics_exporter/main.go:206 +0x848
github.com/RobustPerception/azure_metrics_exporter/vendor/github.com/prometheus/client_gola>ng/prometheus.(*Registry).Gather.func2(0xc0001849d0, 0xc0000ff800, 0x991220, 0xd11b48)
>C:/GoProjects/src/github.com/RobustPerception/azure_metrics_exporter/vendor/github.com/prome>theus/client_golang/prometheus/registry.go:383 +0x68
created by >github.com/RobustPerception/azure_metrics_exporter/vendor/github.com/prometheus/client_gola>ng/prometheus.(*Registry).Gather
>C:/GoProjects/src/github.com/RobustPerception/azure_metrics_exporter/vendor/github.com/prome>theus/client_golang/prometheus/registry.go:381 +0x2f0`
My config is as follows:
credentials:
subscription_id:
client_id:
client_secret:
tenant_id:targets:
- resource: "/resourceGroups/group/providers/Microsoft.Network/applicationGateways/gateway"
metrics:
- name: "MatchedCount"`