From c8ae698e5a69fa694b768cf84c7dba2be025ddd9 Mon Sep 17 00:00:00 2001 From: Ezri Zhu Date: Thu, 14 Nov 2024 00:36:49 -0500 Subject: [PATCH] use rrc instead of city --- lg.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lg.go b/lg.go index a76072f..3a6b727 100644 --- a/lg.go +++ b/lg.go @@ -38,13 +38,13 @@ var ( Name: "bgp_communities", Help: "BGP Communities", }, - []string{"prefix", "city", "mux", "communities"}, + []string{"prefix", "rrc", "mux", "communities"}, ) prefixCountGauge = promauto.NewGaugeVec(prometheus.GaugeOpts{ Name: "prefix_count", Help: "Prefix Count", }, - []string{"prefix", "city", "mux"}, + []string{"prefix", "rrc", "mux"}, ) ) @@ -86,7 +86,7 @@ func (p *Prefix) checkLGState() { for _, rrc := range ripeStatLookingGlassResp.Data.Rrcs { prefixCountGauge.WithLabelValues( p.prefix, - rrc.Location, + rrc.Rrc, p.pop, ).Set(float64(len(rrc.Peers))) } @@ -99,7 +99,7 @@ func (p *Prefix) checkLGState() { for _, e := range peer.Community { bgpCommunitiesGauge.WithLabelValues( p.prefix, - rrc.Location, + rrc.Rrc, p.pop, string(e), ).Set(1)