diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-06-20 11:21:59 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-06-27 09:56:19 +0300 |
commit | 65840591cd8bdc81281357d062728be9309c5597 (patch) | |
tree | 2a6330c16835961a59cfc3e64ac87346339fa544 /spec/controllers/metrics_controller_spec.rb | |
parent | 292cf668905a55e7b305c67b314cb039d2681a54 (diff) |
Gitaly metrics check for read/writeability
Prior to this change, health checks checked for writeability of the NFS
shards. Given we're moving away from that, this patch extends the checks
for Gitaly to check for read and writeability.
Potentially some dashboards will break, as over time these metrics will
no longer appear as Prometheus doesn't get the data anymore.
Observability in the circuit breaker will be reduced, but its not
expected to be turned on and the circuit breaker is being removed soon
too.
Closes https://gitlab.com/gitlab-org/gitaly/issues/1218
Diffstat (limited to 'spec/controllers/metrics_controller_spec.rb')
-rw-r--r-- | spec/controllers/metrics_controller_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/controllers/metrics_controller_spec.rb b/spec/controllers/metrics_controller_spec.rb index 9e8a37171ec..7376841fac8 100644 --- a/spec/controllers/metrics_controller_spec.rb +++ b/spec/controllers/metrics_controller_spec.rb @@ -59,6 +59,13 @@ describe MetricsController do expect(response.body).to match(/^redis_shared_state_ping_latency_seconds [0-9\.]+$/) end + it 'returns Gitaly metrics' do + get :index + + expect(response.body).to match(/^gitaly_health_check_success{shard="default"} 1$/) + expect(response.body).to match(/^gitaly_health_check_latency_seconds{shard="default"} [0-9\.]+$/) + end + context 'prometheus metrics are disabled' do before do allow(Gitlab::Metrics).to receive(:prometheus_metrics_enabled?).and_return(false) |