diff options
author | Andrew Newdigate <andrew@gitlab.com> | 2018-07-12 17:37:51 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2018-07-12 17:37:51 +0000 |
commit | bb65cb1fd5698a12976c670f63e3db4acec3e55d (patch) | |
tree | f31ca3a25488f0cad12511df8bb98808b1387542 /app | |
parent | 07866b040e5015c3259b7084d097e5d4d15a8661 (diff) | |
download | gitlab-ce-bb65cb1fd5698a12976c670f63e3db4acec3e55d.tar.gz |
Remove healthchecks from prometheus endpoint
Diffstat (limited to 'app')
-rw-r--r-- | app/services/metrics_service.rb | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/app/services/metrics_service.rb b/app/services/metrics_service.rb index 51ff9eff5e4..c237d2ae8c9 100644 --- a/app/services/metrics_service.rb +++ b/app/services/metrics_service.rb @@ -1,35 +1,16 @@ require 'prometheus/client/formats/text' class MetricsService - CHECKS = [ - Gitlab::HealthChecks::DbCheck, - Gitlab::HealthChecks::Redis::RedisCheck, - Gitlab::HealthChecks::Redis::CacheCheck, - Gitlab::HealthChecks::Redis::QueuesCheck, - Gitlab::HealthChecks::Redis::SharedStateCheck, - Gitlab::HealthChecks::GitalyCheck - ].freeze - def prometheus_metrics_text Prometheus::Client::Formats::Text.marshal_multiprocess(multiprocess_metrics_path) end - def health_metrics_text - metrics = CHECKS.flat_map(&:metrics) - - formatter.marshal(metrics) - end - def metrics_text - prometheus_metrics_text.concat(health_metrics_text) + prometheus_metrics_text end private - def formatter - @formatter ||= Gitlab::HealthChecks::PrometheusTextFormat.new - end - def multiprocess_metrics_path ::Prometheus::Client.configuration.multiprocess_files_dir end |