From f13c146f0bc0593492a8ffda2023ad38240f178f Mon Sep 17 00:00:00 2001 From: njuettner Date: Wed, 1 Apr 2020 15:04:50 +0200 Subject: [PATCH 1/2] Timestamp of last successful sync with the DNS provider --- controller/controller.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/controller/controller.go b/controller/controller.go index c70a671688..cc4feefb72 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -63,6 +63,14 @@ var ( Help: "Number of Endpoints in the registry", }, ) + lastSyncTimestamp = prometheus.NewGauge( + prometheus.GaugeOpts{ + Namespace: "external_dns", + Subsystem: "controller", + Name: "last_sync_timestamp_seconds", + Help: "Timestamp of last successful sync with the DNS provider", + }, + ) deprecatedRegistryErrors = prometheus.NewCounter( prometheus.CounterOpts{ Subsystem: "registry", @@ -84,6 +92,7 @@ func init() { prometheus.MustRegister(sourceErrorsTotal) prometheus.MustRegister(sourceEndpointsTotal) prometheus.MustRegister(registryEndpointsTotal) + prometheus.MustRegister(lastSyncTimestamp) prometheus.MustRegister(deprecatedRegistryErrors) prometheus.MustRegister(deprecatedSourceErrors) } @@ -140,6 +149,8 @@ func (c *Controller) RunOnce(ctx context.Context) error { deprecatedRegistryErrors.Inc() return err } + + lastSyncTimestamp.SetToCurrentTime() return nil } From a95917312c2612a8ce6a8819e72232b338d86536 Mon Sep 17 00:00:00 2001 From: njuettner Date: Wed, 1 Apr 2020 15:08:32 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae6ba1f7c9..05804f49f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v0.7.1 - 2020-04-01 + + - Prometheus metric: timestamp of last successful sync with the DNS provider (#1480) @njuettner + - Bump alpine base image to 3.11.5 (#1477) @Annegies + - Docs: Add first maintainers in list (#1472) @Raffo + - Fix DomainFilter type in OVH provider (#1469) @ytsarev + - New provider: OVH (#1439) @Hugome + ## v0.7.0 - 2020-03-10 - New source: Add support for Skipper's RouteGroup CRD (#1444) @szuecs