Remove backwards compatibility for pg exporter user table stats
The flag postgres_exporter['per_table_stats'] was replaced in favor of postgres_exporter['flags']['collector.stat_user_tables']. Deprecation documentation: https://docs.gitlab.com/ee/update/deprecations.html#postgres_exporterper_table_stats-configuration-setting Changelog: removed Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8169
This commit is contained in:
parent
e8cecdcf2e
commit
a0c4dd6bea
|
@ -89,7 +89,6 @@ default['monitoring']['postgres_exporter']['flags'] = {
|
|||
'collector.postmaster' => true
|
||||
}
|
||||
default['monitoring']['postgres_exporter']['sslmode'] = nil
|
||||
default['monitoring']['postgres_exporter']['per_table_stats'] = nil
|
||||
default['monitoring']['postgres_exporter']['consul_service_name'] = 'postgres-exporter'
|
||||
default['monitoring']['postgres_exporter']['consul_service_meta'] = nil
|
||||
|
||||
|
|
|
@ -35,8 +35,6 @@ postgres_exporter_database = "#{node['gitlab']['gitlab_rails']['db_database']}#{
|
|||
|
||||
node.default['monitoring']['postgres_exporter']['env']['DATA_SOURCE_NAME'] = "#{postgres_exporter_connection_string} " \
|
||||
"database=#{postgres_exporter_database}"
|
||||
deprecated_per_table_stats = node['monitoring']['postgres_exporter']['per_table_stats']
|
||||
node.override['monitoring']['postgres_exporter']['flags']['collector.stat_user_tables'] = deprecated_per_table_stats unless deprecated_per_table_stats.nil?
|
||||
include_recipe 'postgresql::user'
|
||||
|
||||
# Create log_directory
|
||||
|
|
|
@ -341,7 +341,7 @@ module Gitlab
|
|||
{
|
||||
config_keys: %w(postgres_exporter per_table_stats),
|
||||
deprecation: '16.4', # Remove message issue: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8170
|
||||
removal: '17.0', # Removal issue: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8169
|
||||
removal: '17.0', # Removed in https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8169. This deprecation entry can be removed after the next upgrade stop.
|
||||
note: "Starting with GitLab 17.0, this directive will be controlled by `postgres_exporter['flags'] = { 'collector.stat_user_tables' => bool }`."
|
||||
},
|
||||
{
|
||||
|
|
|
@ -151,11 +151,11 @@ RSpec.describe 'monitoring::postgres-exporter' do
|
|||
stub_gitlab_rb(
|
||||
postgres_exporter: {
|
||||
flags: {
|
||||
'some.flag' => 'foo'
|
||||
'some.flag' => 'foo',
|
||||
'collector.stat_user_tables' => true,
|
||||
},
|
||||
listen_address: 'localhost:9700',
|
||||
enable: true,
|
||||
per_table_stats: true,
|
||||
sslmode: 'require',
|
||||
env: {
|
||||
'USER_SETTING' => 'asdf1234'
|
||||
|
|
Loading…
Reference in New Issue