From 31d1d8fbb687158c1f21acf30faf5c13aa7a9124 Mon Sep 17 00:00:00 2001 From: Ezri Zhu Date: Thu, 10 Oct 2024 01:31:27 -0400 Subject: [PATCH] clear past data --- lg.go | 3 +++ vis.go | 1 + 2 files changed, 4 insertions(+) diff --git a/lg.go b/lg.go index fc769c7..d904626 100644 --- a/lg.go +++ b/lg.go @@ -44,6 +44,9 @@ var ( func (p *Prefix) checkLGState() { log.Trace().Str("Prefix", p.prefix).Msg("checking prefix state") + upstreamsGauge.Reset() + upstreams2Gauge.Reset() + bgpCommunitiesGauge.Reset() url := ripestatBase + "/data/looking-glass/data.json?resource=" + p.prefix + "&sourceapp=" + appId resp, err := http.Get(url) if err != nil { diff --git a/vis.go b/vis.go index 0975a43..ee4ac20 100644 --- a/vis.go +++ b/vis.go @@ -25,6 +25,7 @@ var ( func (p *Prefix) checkVisState() { log.Trace().Str("Prefix", p.prefix).Msg("checking prefix state") + prefixStateGauge.Reset() url := ripestatBase + "/data/visibility/data.json?data_overload_limit=ignore&include=peers_seeing&resource=" + p.prefix + "&sourceapp=" + appId resp, err := http.Get(url) if err != nil {