summaryrefslogtreecommitdiff
path: root/app/views/admin/application_settings/_influx.html.haml
blob: b40a714ed8f97cc00ebe151e9e4694bce08b27ce (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
= form_for @application_setting, url: admin_application_settings_path, html: { class: 'fieldset-form' } do |f|
  = form_errors(@application_setting)

  %fieldset
    %p
      Setup InfluxDB to measure a wide variety of statistics like the time spent
      in running SQL queries. These settings require a
      = link_to 'restart', help_page_path('administration/restart_gitlab')
      to take effect.
      = link_to icon('question-circle'), help_page_path('administration/monitoring/performance/introduction')
    .form-group.row
      .offset-sm-2.col-sm-10
        .form-check
          = f.check_box :metrics_enabled, class: 'form-check-input'
          = f.label :metrics_enabled, class: 'form-check-label' do
            Enable InfluxDB Metrics
    .form-group.row
      = f.label :metrics_host, 'InfluxDB host', class: 'col-form-label col-sm-2'
      .col-sm-10
        = f.text_field :metrics_host, class: 'form-control', placeholder: 'influxdb.example.com'
    .form-group.row
      = f.label :metrics_port, 'InfluxDB port', class: 'col-form-label col-sm-2'
      .col-sm-10
        = f.text_field :metrics_port, class: 'form-control', placeholder: '8089'
        .form-text.text-muted
          The UDP port to use for connecting to InfluxDB. InfluxDB requires that
          your server configuration specifies a database to store data in when
          sending messages to this port, without it metrics data will not be
          saved.
    .form-group.row
      = f.label :metrics_pool_size, 'Connection pool size', class: 'col-form-label col-sm-2'
      .col-sm-10
        = f.number_field :metrics_pool_size, class: 'form-control'
        .form-text.text-muted
          The amount of InfluxDB connections to open. Connections are opened
          lazily. Users using multi-threaded application servers should ensure
          enough connections are available (at minimum the amount of application
          server threads).
    .form-group.row
      = f.label :metrics_timeout, 'Connection timeout', class: 'col-form-label col-sm-2'
      .col-sm-10
        = f.number_field :metrics_timeout, class: 'form-control'
        .form-text.text-muted
          The amount of seconds after which an InfluxDB connection will time
          out.
    .form-group.row
      = f.label :metrics_method_call_threshold, 'Method Call Threshold (ms)', class: 'col-form-label col-sm-2'
      .col-sm-10
        = f.number_field :metrics_method_call_threshold, class: 'form-control'
        .form-text.text-muted
          A method call is only tracked when it takes longer to complete than
          the given amount of milliseconds.
    .form-group.row
      = f.label :metrics_sample_interval, 'Sampler Interval (sec)', class: 'col-form-label col-sm-2'
      .col-sm-10
        = f.number_field :metrics_sample_interval, class: 'form-control'
        .form-text.text-muted
          The sampling interval in seconds. Sampled data includes memory usage,
          retained Ruby objects, file descriptors and so on.
    .form-group.row
      = f.label :metrics_packet_size, 'Metrics per packet', class: 'col-form-label col-sm-2'
      .col-sm-10
        = f.number_field :metrics_packet_size, class: 'form-control'
        .form-text.text-muted
          The amount of points to store in a single UDP packet. More points
          results in fewer but larger UDP packets being sent.

  = f.submit 'Save changes', class: "btn btn-success"