GitLab Maintenance Mode should be exported via a Prometheus Metric
What does this MR do and why?
Adds a new worker and service class to update instance wide metrics that are not specific to any specific context (user/project/shard/vm/process)
Adds maintenance_mode state to the global metrics
How to set up and validate locally
- Enable Sidekiq exporter (via gitlab.yml):
sidekiq_exporter: enabled: true address: localhost port: 3807 - Enable or disable maintenance mode in application settings
- Wait for the cronjob to run (every minute)
- Check whether
gitlab_maintenance_modemetric is being exported (access http://localhost:3807/metrics):# HELP gitlab_maintenance_mode Multiprocess metric # TYPE gitlab_maintenance_mode gauge gitlab_maintenance_mode{pid="sidekiq_0"} 0
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.
Related to #387627 (closed)
Edited by Gabriel Mazetto