diff --git a/.gitignore b/.gitignore index db26547..1b72e63 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,9 @@ go.work # vscode Go debugging files __debug_* +ntppool-exporter +bin/ # vscode editor config .vscode/ + diff --git a/collector/collector.go b/collector/collector.go index 536f92a..7a332e4 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -52,7 +52,7 @@ func (c Collector) Describe(ch chan<- *prometheus.Desc) { // Collect implements Prometheus.Collector. func (c Collector) Collect(ch chan<- prometheus.Metric) { - logger := log.With(c.logger, "scraper") + logger := log.With(c.logger, "module", "scraper") level.Debug(logger).Log("msg", "Starting scrape") start := time.Now() c.collect(ch, logger) @@ -102,9 +102,9 @@ func (c Collector) collect(ch chan<- prometheus.Metric, logger log.Logger) { } // TODO: Test or delete - serverScoreMetric := prometheus.NewDesc("ntppool_score", + serverScoreMetric := prometheus.NewDesc("ntppool_server_score", "Shows the server score currently assigned at ntppool.org", - nil, prometheus.Labels{"server": c.target.String()}) + nil, nil) // TODO: Test or delete //c.metrics.NtpppolServerScore.Add(serverApiScore)