Welcome to mirror list, hosted at ThFree Co, Russian Federation.

wal_rate.rb « indicators « health_status « database « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: de31b5899ebb8a3db548f35e3be1ebb28f77b429 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# frozen_string_literal: true

module Gitlab
  module Database
    module HealthStatus
      module Indicators
        class WalRate < PrometheusAlertIndicator
          private

          def enabled?
            Feature.enabled?(:db_health_check_wal_rate, type: :ops)
          end

          def sli_query_key
            :wal_rate_sli_query
          end

          def slo_key
            :wal_rate_slo
          end

          def alert_condition
            ALERT_CONDITIONS[:below]
          end
        end
      end
    end
  end
end