Geo: Bring back legacy project Prometheus metrics
What does this MR do and why?
Geo: Bring back legacy project Prometheus metrics
Issue: #429617 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before
Metrics named geo_repositories_*
are not exported by Sidekiq.
(Side note: geo_repositories
is output)
After
Metrics named geo_repositories_*
are exported by Sidekiq.
# HELP geo_repositories_checked Multiprocess metric
# TYPE geo_repositories_checked gauge
geo_repositories_checked{name="gdk",url="gdk"} 18
# HELP geo_repositories_checked_failed Multiprocess metric
# TYPE geo_repositories_checked_failed gauge
geo_repositories_checked_failed{name="gdk",url="gdk"} 0
# HELP geo_repositories_checksum_failed Multiprocess metric
# TYPE geo_repositories_checksum_failed gauge
geo_repositories_checksum_failed{name="gdk",url="gdk"} 0
# HELP geo_repositories_checksummed Multiprocess metric
# TYPE geo_repositories_checksummed gauge
geo_repositories_checksummed{name="gdk",url="gdk"} 18
# HELP geo_repositories_failed Multiprocess metric
# TYPE geo_repositories_failed gauge
geo_repositories_failed{name="gdk2",url="gdk2"} 0
# HELP geo_repositories_synced Multiprocess metric
# TYPE geo_repositories_synced gauge
geo_repositories_synced{name="gdk2",url="gdk2"} 18
# HELP geo_repositories_verification_failed Multiprocess metric
# TYPE geo_repositories_verification_failed gauge
geo_repositories_verification_failed{name="gdk2",url="gdk2"} 0
# HELP geo_repositories_verified Multiprocess metric
# TYPE geo_repositories_verified gauge
geo_repositories_verified{name="gdk2",url="gdk2"} 18
(Side note: geo_repositories
is output, no change)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Confirm that the legacy project repo metrics are not output in main:
- If you don't have a GDK + Geo install, follow Geo Easy Installation to set up a fresh install.
- Enable Sidekiq exporter in your primary Geo site GDK
gdk config set gitlab.rails_background_jobs.sidekiq_exporter_enabled true
. See Monitoring the GDK with Prometheus, though in this case we don't actually need to set up the Prometheus instance. We're only interested in confirming that the Sidekiq exporter endpoint is outputting the legacy metrics (or not). gdk reconfigure
gdk restart
- Visit the Sidekiq exporter's metrics endpoint
http://<your GDK host>:3807/metrics
- Find in page the legacy metrics shown in this MR's diff:
geo_repositories*
- None found except for
geo_repositories
.
Confirm that the metrics are output in this MR's branch:
- Checkout the branch
gdk restart
- Visit the Sidekiq exporter's metrics endpoint
http://<your GDK host>:3807/metrics
- Find in page the legacy metrics shown in this MR's diff:
geo_repositories*
- Compare the values to the corresponding SSF metric values:
geo_project_repositories*
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Michael Kozono