Geo - Missing Prometheus metrics

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

While working on !164940 (merged), we noticed we may be missing some metrics endpoints in this document for Geo: https://docs.gitlab.com/ee/administration/monitoring/prometheus/gitlab_metrics.html. There are also some Prometheus metric names that do not follow our convention and include the suffix _total. See https://gitlab.com/gitlab-org/gitlab/-/blob/v17.3.0-ee/ee/app/services/geo/metrics_update_service.rb#L71.

  • Missing Prometheus Metrics:

    • geo_replication_slots
    • geo_replication_slots_used
    • geo_replication_slots_max_retained_wal_bytes
    • geo_status_message
    • geo_event_log_max_id
    • geo_repositories_checked
    • geo_repositories_checked_failed
    • geo_container_repositories_replication_enabled,:
    • geo_package_files_checksum_total,:
    • geo_package_files_verification_total
    • geo_package_files_verified
    • geo_package_files_verification_faile
    • geo_snippet_repositories_checksum_total
    • geo_snippet_repositories_verification_total
    • geo_snippet_repositories_verified
    • geo_snippet_repositories_verification_failed
    • geo_pipeline_artifacts
    • geo_pipeline_artifacts_checksum_total
    • geo_pipeline_artifacts_checksummed
    • geo_pipeline_artifacts_checksum_failed
    • geo_pipeline_artifacts_synced
    • geo_pipeline_artifacts_failed
    • geo_pipeline_artifacts_registry
    • geo_pipeline_artifacts_verification_total
    • geo_pipeline_artifacts_verified
    • geo_pipeline_artifacts_verification_failed
  • The Prometheus Metric name is wrong (the replicable name is not plural)

    • geo_dependency_proxy_blobs
    • geo_dependency_proxy_blobs_checksum_total
    • geo_dependency_proxy_blobs_checksummed
    • geo_dependency_proxy_blobs_checksum_failed
    • geo_dependency_proxy_blobs_synced
    • geo_dependency_proxy_blobs_failed
    • geo_dependency_proxy_blobs_registry
    • geo_dependency_proxy_blobs_verification_total
    • geo_dependency_proxy_blobs_verified
    • geo_dependency_proxy_blobs_verification_failed
  • Prometheus Metrics in the doc above but are not exposed anymore:

    • geo_status_failed_total

Steps to reproduce

You can get the Geo Prometheus Metrics by running the following snippet in a Rails console session on a Geo primary site. Then, you can use the metrics to compare them at https://docs.gitlab.com/ee/administration/monitoring/prometheus/gitlab_metrics.html.

METRIC_PREFIX = 'geo_'

GeoNodeStatus::PROMETHEUS_METRICS.map do |name, docstring|
  base_name = name.to_s.gsub(/(_count|_total)$/, '')
  (METRIC_PREFIX + base_name).to_sym
end
Edited by 🤖 GitLab Bot 🤖