tynany / frr_exporter

Prometheus exporter for Free Range Routing
MIT License
99 stars 35 forks source link

bgp l2vpn collector tries to unmarshal empty json #29

Closed fdomain closed 3 years ago

fdomain commented 3 years ago

Hello,

I have a FRR server (v7.5.1) running in Route Server mode. Some of the neighbors advertise prefixes over the l2vpn evpn AFI/SAFI, so I've enabled the bgp l2vpn collector with the flag --collector.bgpl2vpn

However, I encounter this error at each scrape: ERRO[0004] collector "bgpl2vpn" scrape failed: cannot unmarshal outputs of 'show evpn vni json': unexpected end of JSON input source="collector.go:138"

Indeed, if I run this command show evpn vni json in vtysh on my route server, I do not have any output (that's expected as I don't have any VRF/VXLAN/VNI configured locally).

I'll propose a PR to fix this.

tynany commented 3 years ago

Thanks. I will make a new release of frr_exporter that includes this bugfix shortly -- just waiting for another bugfix and feature to be merged.