X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6d95130da47af9fd0290d3c8f80a0364faf74957..10db2d51a25a80840f299f09baada5588af991f3:/services/health/main.go diff --git a/services/health/main.go b/services/health/main.go index bc57d36d04..92bd377c80 100644 --- a/services/health/main.go +++ b/services/health/main.go @@ -20,8 +20,18 @@ var ( command cmd.Handler = service.Command(arvados.ServiceNameHealth, newHandler) ) -func newHandler(ctx context.Context, cluster *arvados.Cluster, _ string, _ *prometheus.Registry) service.Handler { - return &health.Aggregator{Cluster: cluster} +func newHandler(ctx context.Context, cluster *arvados.Cluster, _ string, reg *prometheus.Registry) service.Handler { + mClockSkew := prometheus.NewGauge(prometheus.GaugeOpts{ + Namespace: "arvados", + Subsystem: "health", + Name: "clock_skew_seconds", + Help: "Clock skew observed in most recent health check", + }) + reg.MustRegister(mClockSkew) + return &health.Aggregator{ + Cluster: cluster, + MetricClockSkew: mClockSkew, + } } func main() {