Skip to content

Add gitlab_main_cell schema to PrometheusAlertIndicator

What does this MR do and why?

This updates PrometheusAlertIndicator to support the gitlab_main_cell schema.

Script to include gitlab_main_cell schema settings in application_settings:

Note that for now since gitlab_main_cell schema exists on gitlab_main database (patroni), so gitlab_main_cell configuration is a copy of gitlab_main schema configuration.

application_setting = ApplicationSetting.last
prometheus_alert_db_indicators_settings = application_setting.prometheus_alert_db_indicators_settings

application_setting.update(prometheus_alert_db_indicators_settings: prometheus_alert_db_indicators_settings.deep_merge({
  "apdex_slo" => {
    "main_cell" => 0.997
  },
  "wal_rate_slo" => {
    "main_cell" => 70000000
  },
  "apdex_sli_query" => {
    "main_cell" => "avg_over_time(gitlab_service_apdex:ratio_5m{env='gstg',environment='gstg',monitor='global',type='patroni'}[5m])"
  },
  "wal_rate_sli_query" => {
    "main_cell" => "avg(postgres:pg_xlog_bytes_per_second:rate5m{env='gstg', type='patroni'})"
  }
}))

Related to: #433196 (closed)

Change Requests (CR) issues

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Rodrigo Tomonari

Merge request reports

Loading