mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-09-21 16:10:59 +02:00
Timestamp of last successful sync with the DNS provider
This commit is contained in:
parent
2767488552
commit
f13c146f0b
@ -63,6 +63,14 @@ var (
|
|||||||
Help: "Number of Endpoints in the registry",
|
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(
|
deprecatedRegistryErrors = prometheus.NewCounter(
|
||||||
prometheus.CounterOpts{
|
prometheus.CounterOpts{
|
||||||
Subsystem: "registry",
|
Subsystem: "registry",
|
||||||
@ -84,6 +92,7 @@ func init() {
|
|||||||
prometheus.MustRegister(sourceErrorsTotal)
|
prometheus.MustRegister(sourceErrorsTotal)
|
||||||
prometheus.MustRegister(sourceEndpointsTotal)
|
prometheus.MustRegister(sourceEndpointsTotal)
|
||||||
prometheus.MustRegister(registryEndpointsTotal)
|
prometheus.MustRegister(registryEndpointsTotal)
|
||||||
|
prometheus.MustRegister(lastSyncTimestamp)
|
||||||
prometheus.MustRegister(deprecatedRegistryErrors)
|
prometheus.MustRegister(deprecatedRegistryErrors)
|
||||||
prometheus.MustRegister(deprecatedSourceErrors)
|
prometheus.MustRegister(deprecatedSourceErrors)
|
||||||
}
|
}
|
||||||
@ -140,6 +149,8 @@ func (c *Controller) RunOnce(ctx context.Context) error {
|
|||||||
deprecatedRegistryErrors.Inc()
|
deprecatedRegistryErrors.Inc()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lastSyncTimestamp.SetToCurrentTime()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user