Skip to content

Commit

Permalink
use rrc instead of city
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrizhu committed Nov 14, 2024
1 parent 74b3dcb commit c8ae698
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lg.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
)
)

Expand Down Expand Up @@ -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)))
}
Expand All @@ -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)
Expand Down

0 comments on commit c8ae698

Please sign in to comment.