Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrizhu committed Oct 18, 2024
1 parent 0426378 commit 7f30ac2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 0 additions & 4 deletions lg.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ func (p *Prefix) checkLGState() {
availableStr = "n"
}

upstreamsGauge.Reset()
upstreams2Gauge.Reset()
bgpCommunitiesGauge.Reset()

origin := strconv.Itoa(p.origin)

for _, rrc := range ripeStatLookingGlassResp.Data.Rrcs {
Expand Down
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ const ripestatBase = "https://stat.ripe.net"

func updateStates() {
log.Debug().Msg("Updating Prefixes")

upstreamsGauge.Reset()
upstreams2Gauge.Reset()
bgpCommunitiesGauge.Reset()

for _, prefix := range monitorState {
prefix.checkVisState()
prefix.checkLGState()
Expand Down Expand Up @@ -60,9 +65,8 @@ func main() {
Str("Data Source", "RIPE RIS via RIPEstat API").
Msg("Starting PEERINGMON Exporter")

updateStates()

setUpstreamGauge()
updateStates()

go func() {
ticker := time.NewTicker(1 * time.Minute)
Expand Down

0 comments on commit 7f30ac2

Please sign in to comment.