diff --git a/internal/collector/collector.go b/internal/collector/collector.go index d76d0cc..ef91108 100644 --- a/internal/collector/collector.go +++ b/internal/collector/collector.go @@ -126,6 +126,7 @@ type NetatmoCollector struct { cachedData *netatmo.DeviceCollection } +// Describe implements prometheus.Collector func (c *NetatmoCollector) Describe(dChan chan<- *prometheus.Desc) { dChan <- updatedDesc dChan <- tempDesc @@ -133,6 +134,7 @@ func (c *NetatmoCollector) Describe(dChan chan<- *prometheus.Desc) { dChan <- cotwoDesc } +// Collect implements prometheus.Collector func (c *NetatmoCollector) Collect(mChan chan<- prometheus.Metric) { now := time.Now() if now.Sub(c.lastRefresh) >= c.RefreshInterval { diff --git a/internal/config/config.go b/internal/config/config.go index 5bc9fa7..2a76a41 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -30,7 +30,7 @@ const ( flagNetatmoPassword = "password" defaultRefreshInterval = 8 * time.Minute - defaultStaleDuration = 30 * time.Minute + defaultStaleDuration = 60 * time.Minute ) var (