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

web_exporter.rb « exporter « metrics « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f4b42759fb9d63e9eb879a4147063b02ccbbe2c9 (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
30
# frozen_string_literal: true

require 'webrick'
require 'prometheus/client/rack/exporter'

module Gitlab
  module Metrics
    module Exporter
      class WebExporter < BaseExporter
        # This exporter is always run on master process
        def initialize
          super

          self.additional_checks = [
            Gitlab::HealthChecks::PumaCheck,
            Gitlab::HealthChecks::UnicornCheck
          ]
        end

        def settings
          Settings.monitoring.web_exporter
        end

        def log_filename
          File.join(Rails.root, 'log', 'web_exporter.log')
        end
      end
    end
  end
end