From de3ce59a9edf754c5093f059c1ca9447d856d18a Mon Sep 17 00:00:00 2001 From: rico Date: Wed, 18 May 2022 21:36:50 +0800 Subject: [PATCH] fix: remove peggo sync to fix same name and label values issue --- collector/collector.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/collector/collector.go b/collector/collector.go index f966a74..3b6d875 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -26,7 +26,6 @@ type Exporter struct { // Metrics peggoHeighestEventNonce *prometheus.Desc peggoOwnEventNonce *prometheus.Desc - peggoSync *prometheus.Desc } type QueryValidatorsResponse struct { @@ -66,19 +65,12 @@ func New(peggoRestRpc string, cosmosOrchestratorAddr string, timeout time.Durati nil, nil, ), - peggoSync: prometheus.NewDesc( - prometheus.BuildFQName(namespace, "", "peggo_sync"), - "Compare your own orchestrator event nonce with the highest event nonce are the same", - nil, - nil, - ), } } func (e *Exporter) Describe(ch chan<- *prometheus.Desc) { ch <- e.peggoHeighestEventNonce ch <- e.peggoOwnEventNonce - ch <- e.peggoSync } func (e *Exporter) Collect(ch chan<- prometheus.Metric) { @@ -166,13 +158,8 @@ func (e *Exporter) Collect(ch chan<- prometheus.Metric) { eventNonces = append(eventNonces, evtNonce) } - if heighestEventNonce > ownEventNonce { - ch <- prometheus.MustNewConstMetric(e.peggoSync, prometheus.GaugeValue, 0) - } - ch <- prometheus.MustNewConstMetric(e.peggoHeighestEventNonce, prometheus.GaugeValue, float64(heighestEventNonce)) ch <- prometheus.MustNewConstMetric(e.peggoOwnEventNonce, prometheus.GaugeValue, float64(ownEventNonce)) - ch <- prometheus.MustNewConstMetric(e.peggoSync, prometheus.GaugeValue, 1) data := map[string]interface{}{} data["ownEventNonce"] = ownEventNonce