From 06b219db8f440da4c45617b37448167c7092305a Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 2 Jan 2025 13:01:06 +0100 Subject: [PATCH 1/8] statsd_exporter: Move data from hiera to puppet This enables puppet-strings to pick up the data. There is no OS-specific data in hiera: ``` $ git grep statsd data/ $ ``` --- REFERENCE.md | 20 ++++++++++++++++++++ data/defaults.yaml | 10 ---------- manifests/statsd_exporter.pp | 20 ++++++++++---------- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 5fa03c343..e583625c9 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -13492,6 +13492,8 @@ Data type: `String` Extension for the release binary archive +Default value: `'tar.gz'` + ##### `download_url` Data type: `Optional[Prometheus::Uri]` @@ -13506,12 +13508,16 @@ Data type: `Prometheus::Uri` Base URL for the binary archive +Default value: `'https://github.com/prometheus/statsd_exporter/releases'` + ##### `extra_groups` Data type: `Array` Extra groups to add the binary user to +Default value: `[]` + ##### `extra_options` Data type: `Optional[String[1]]` @@ -13526,6 +13532,8 @@ Data type: `String[1]` Group under which the binary is running +Default value: `'statsd-exporter'` + ##### `init_style` Data type: `Prometheus::Initstyle` @@ -13580,12 +13588,16 @@ Data type: `String[1]` If package, then use this for package ensure default 'latest' +Default value: `'latest'` + ##### `package_name` Data type: `String[1]` The binary package name - not available yet +Default value: `'statsd_exporter'` + ##### `purge_config_dir` Data type: `Boolean` @@ -13624,6 +13636,8 @@ Data type: `String[1]` Name of the statsd exporter service (default 'statsd_exporter') +Default value: `'statsd_exporter'` + ##### `mappings` Data type: `Array[Hash]` @@ -13635,12 +13649,16 @@ The hiera array for mappings: processor: '$2' action: '$1' +Default value: `[]` + ##### `user` Data type: `String[1]` User which runs the service +Default value: `'statsd-exporter'` + ##### `version` Data type: `String[1]` @@ -13671,6 +13689,8 @@ Data type: `Stdlib::Absolutepath` +Default value: `'/etc/statsd-exporter-mapping.yaml'` + ##### `export_scrape_job` Data type: `Boolean` diff --git a/data/defaults.yaml b/data/defaults.yaml index 524bfd529..9c83d4dc1 100644 --- a/data/defaults.yaml +++ b/data/defaults.yaml @@ -178,13 +178,3 @@ prometheus::snmp_exporter::package_ensure: 'latest' prometheus::snmp_exporter::package_name: 'snmp_exporter' prometheus::snmp_exporter::service_name: 'snmp_exporter' prometheus::snmp_exporter::user: 'snmp-exporter' -prometheus::statsd_exporter::download_extension: 'tar.gz' -prometheus::statsd_exporter::download_url_base: 'https://github.com/prometheus/statsd_exporter/releases' -prometheus::statsd_exporter::extra_groups: [] -prometheus::statsd_exporter::group: 'statsd-exporter' -prometheus::statsd_exporter::mapping_config_path: '/etc/statsd-exporter-mapping.yaml' -prometheus::statsd_exporter::mappings: [] -prometheus::statsd_exporter::package_ensure: 'latest' -prometheus::statsd_exporter::package_name: 'statsd_exporter' -prometheus::statsd_exporter::service_name: 'statsd_exporter' -prometheus::statsd_exporter::user: 'statsd-exporter' diff --git a/manifests/statsd_exporter.pp b/manifests/statsd_exporter.pp index 455c52064..e701646e6 100644 --- a/manifests/statsd_exporter.pp +++ b/manifests/statsd_exporter.pp @@ -59,16 +59,16 @@ # @param proxy_type # Optional proxy server type (none|http|https|ftp) class prometheus::statsd_exporter ( - String $download_extension, - Prometheus::Uri $download_url_base, - Array $extra_groups, - String[1] $group, - Stdlib::Absolutepath $mapping_config_path, - String[1] $package_ensure, - String[1] $package_name, - String[1] $service_name, - Array[Hash] $mappings, - String[1] $user, + String $download_extension = 'tar.gz', + Prometheus::Uri $download_url_base = 'https://github.com/prometheus/statsd_exporter/releases', + Array $extra_groups = [], + String[1] $group = 'statsd-exporter', + Stdlib::Absolutepath $mapping_config_path = '/etc/statsd-exporter-mapping.yaml', + String[1] $package_ensure = 'latest', + String[1] $package_name = 'statsd_exporter', + String[1] $service_name = 'statsd_exporter', + Array[Hash] $mappings = [], + String[1] $user = 'statsd-exporter', # renovate: depName=prometheus/statsd_exporter String[1] $version = '0.26.1', String[1] $arch = $prometheus::real_arch, From f216bae56e39a611b5cc61747686bbddc7997420 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 2 Jan 2025 13:49:33 +0100 Subject: [PATCH 2/8] snmp_exporter: Move data from hiera to puppet class --- REFERENCE.md | 24 ++++++++++++++++++++++-- data/defaults.yaml | 10 ---------- manifests/snmp_exporter.pp | 20 ++++++++++---------- 3 files changed, 32 insertions(+), 22 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index e583625c9..20d464b28 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -12568,6 +12568,8 @@ Data type: `Stdlib::Absolutepath` Absolute path to configuration file +Default value: `'/etc/snmp-exporter.yaml'` + ##### `config_mode` Data type: `String[1]` @@ -12578,16 +12580,20 @@ Default value: `$prometheus::config_mode` ##### `config_template` -Data type: `String` +Data type: `String[0]` Configuration template to use. If empty, uses upstream config (default "") +Default value: `''` + ##### `download_extension` -Data type: `String` +Data type: `String[0]` Extension for the release binary archive +Default value: `'tar.gz'` + ##### `download_url` Data type: `Optional[Prometheus::Uri]` @@ -12602,12 +12608,16 @@ Data type: `Prometheus::Uri` Base URL for the binary archive +Default value: `'https://github.com/prometheus/snmp_exporter/releases'` + ##### `extra_groups` Data type: `Array` Extra groups to add the binary user to +Default value: `[]` + ##### `extra_options` Data type: `Optional[String[1]]` @@ -12622,6 +12632,8 @@ Data type: `String[1]` Group under which the binary is running +Default value: `snmp-exporter` + ##### `init_style` Data type: `Prometheus::Initstyle` @@ -12676,12 +12688,16 @@ Data type: `String[1]` If package, then use this for package ensure default 'latest' +Default value: `'latest'` + ##### `package_name` Data type: `String[1]` The binary package name - not available yet +Default value: `'snmp_exporter'` + ##### `purge_config_dir` Data type: `Boolean` @@ -12720,12 +12736,16 @@ Data type: `String[1]` Name of the snmp exporter service (default 'snmp_exporter') +Default value: `'snmp_exporter'` + ##### `user` Data type: `String[1]` User which runs the service +Default value: `'snmp-exporter'` + ##### `version` Data type: `String[1]` diff --git a/data/defaults.yaml b/data/defaults.yaml index 9c83d4dc1..6f5abba83 100644 --- a/data/defaults.yaml +++ b/data/defaults.yaml @@ -168,13 +168,3 @@ prometheus::beanstalkd_exporter::service_name: 'beanstalkd_exporter' prometheus::beanstalkd_exporter::user: 'beanstalkd-exporter' prometheus::beanstalkd_exporter::mapping_config: '/etc/beanstalkd-exporter-mapping.conf' prometheus::beanstalkd_exporter::config: '/etc/beanstalkd-exporter.conf' -prometheus::snmp_exporter::config_file: '/etc/snmp-exporter.yaml' -prometheus::snmp_exporter::config_template: '' -prometheus::snmp_exporter::download_extension: 'tar.gz' -prometheus::snmp_exporter::download_url_base: 'https://github.com/prometheus/snmp_exporter/releases' -prometheus::snmp_exporter::extra_groups: [] -prometheus::snmp_exporter::group: 'snmp-exporter' -prometheus::snmp_exporter::package_ensure: 'latest' -prometheus::snmp_exporter::package_name: 'snmp_exporter' -prometheus::snmp_exporter::service_name: 'snmp_exporter' -prometheus::snmp_exporter::user: 'snmp-exporter' diff --git a/manifests/snmp_exporter.pp b/manifests/snmp_exporter.pp index 626b18fcd..477c2e94f 100644 --- a/manifests/snmp_exporter.pp +++ b/manifests/snmp_exporter.pp @@ -56,16 +56,16 @@ # @param proxy_type # Optional proxy server type (none|http|https|ftp) class prometheus::snmp_exporter ( - Stdlib::Absolutepath $config_file, - String $config_template, - String $download_extension, - Prometheus::Uri $download_url_base, - Array $extra_groups, - String[1] $group, - String[1] $package_ensure, - String[1] $package_name, - String[1] $service_name, - String[1] $user, + Stdlib::Absolutepath $config_file = '/etc/snmp-exporter.yaml', + String[0] $config_template = '', # lint:ignore:params_empty_string_assignment + String[0] $download_extension = 'tar.gz', + Prometheus::Uri $download_url_base = 'https://github.com/prometheus/snmp_exporter/releases', + Array $extra_groups = [], + String[1] $group = snmp-exporter, + String[1] $package_ensure = 'latest', + String[1] $package_name = 'snmp_exporter', + String[1] $service_name = 'snmp_exporter', + String[1] $user = 'snmp-exporter', # renovate: depName=prometheus/snmp_exporter String[1] $version = '0.26.0', Boolean $purge_config_dir = true, From fbff15a15eef8391cee740f74023636ea705082a Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 2 Jan 2025 14:22:07 +0100 Subject: [PATCH 3/8] beanstalkd_exporter: Move data from hiera to puppet class --- REFERENCE.md | 30 +++++++++++++++++++++++++++--- data/defaults.yaml | 12 ------------ manifests/beanstalkd_exporter.pp | 24 ++++++++++++------------ 3 files changed, 39 insertions(+), 27 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 20d464b28..754c93425 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1705,34 +1705,44 @@ Default value: `$prometheus::bin_dir` ##### `config` -Data type: `String[1]` +Data type: `Stdlib::Absolutepath` Path to configuration file that stores beanstalkd address +Default value: `'/etc/beanstalkd-exporter.conf'` + ##### `mapping_config` -Data type: `String[1]` +Data type: `Stdlib::Absolutepath` Path to configuration file with tubes mappings (not implemented) +Default value: `'/etc/beanstalkd-exporter-mapping.conf'` + ##### `beanstalkd_address` Data type: `String[1]` Address of beanstalkd, defaults to localhost +Default value: `'127.0.0.1:11300'` + ##### `exporter_listen` Data type: `String[1]` Address to bind beanstalkd_exporter to. Default is different than upstream (*:9371) +Default value: `':9371'` + ##### `download_extension` -Data type: `String` +Data type: `String[0]` Extension for the release binary archive +Default value: `''` + ##### `download_url` Data type: `Variant[Undef,String]` @@ -1747,12 +1757,16 @@ Data type: `Prometheus::Uri` Base URL for the binary archive +Default value: `'https://github.com/messagebird/beanstalkd_exporter/releases'` + ##### `extra_groups` Data type: `Array` Extra groups to add the binary user to +Default value: `[]` + ##### `extra_options` Data type: `Optional[String[1]]` @@ -1767,6 +1781,8 @@ Data type: `String[1]` Group under which the binary is running +Default value: `'beanstalkd-exporter'` + ##### `init_style` Data type: `Prometheus::Initstyle` @@ -1821,12 +1837,16 @@ Data type: `String[1]` If package, then use this for package ensure default 'latest' +Default value: `'latest'` + ##### `package_name` Data type: `String[1]` The binary package name - not available yet +Default value: `'beanstalkd_exporter'` + ##### `purge_config_dir` Data type: `Boolean` @@ -1865,12 +1885,16 @@ Data type: `String[1]` Name of the beanstalkd exporter service (default 'beanstalkd_exporter') +Default value: `'beanstalkd_exporter'` + ##### `user` Data type: `String[1]` User which runs the service +Default value: `'beanstalkd-exporter'` + ##### `version` Data type: `String[1]` diff --git a/data/defaults.yaml b/data/defaults.yaml index 6f5abba83..7146ecc4d 100644 --- a/data/defaults.yaml +++ b/data/defaults.yaml @@ -156,15 +156,3 @@ prometheus::node_exporter::group: 'node-exporter' prometheus::node_exporter::package_ensure: 'latest' prometheus::node_exporter::package_name: 'node_exporter' prometheus::node_exporter::user: 'node-exporter' -prometheus::beanstalkd_exporter::exporter_listen: ':9371' -prometheus::beanstalkd_exporter::beanstalkd_address: '127.0.0.1:11300' -prometheus::beanstalkd_exporter::download_extension: '' -prometheus::beanstalkd_exporter::download_url_base: 'https://github.com/messagebird/beanstalkd_exporter/releases' -prometheus::beanstalkd_exporter::extra_groups: [] -prometheus::beanstalkd_exporter::group: 'beanstalkd-exporter' -prometheus::beanstalkd_exporter::package_ensure: 'latest' -prometheus::beanstalkd_exporter::package_name: 'beanstalkd_exporter' -prometheus::beanstalkd_exporter::service_name: 'beanstalkd_exporter' -prometheus::beanstalkd_exporter::user: 'beanstalkd-exporter' -prometheus::beanstalkd_exporter::mapping_config: '/etc/beanstalkd-exporter-mapping.conf' -prometheus::beanstalkd_exporter::config: '/etc/beanstalkd-exporter.conf' diff --git a/manifests/beanstalkd_exporter.pp b/manifests/beanstalkd_exporter.pp index fa2345843..2e4d56349 100644 --- a/manifests/beanstalkd_exporter.pp +++ b/manifests/beanstalkd_exporter.pp @@ -58,18 +58,18 @@ # @param proxy_type # Optional proxy server type (none|http|https|ftp) class prometheus::beanstalkd_exporter ( - String $download_extension, - Prometheus::Uri $download_url_base, - Array $extra_groups, - String[1] $group, - String[1] $package_ensure, - String[1] $package_name, - String[1] $service_name, - String[1] $user, - String[1] $config, - String[1] $mapping_config, - String[1] $beanstalkd_address, - String[1] $exporter_listen, + String[0] $download_extension = '', # lint:ignore:params_empty_string_assignment + Prometheus::Uri $download_url_base = 'https://github.com/messagebird/beanstalkd_exporter/releases', + Array $extra_groups = [], + String[1] $group = 'beanstalkd-exporter', + String[1] $package_ensure = 'latest', + String[1] $package_name = 'beanstalkd_exporter', + String[1] $service_name = 'beanstalkd_exporter', + String[1] $user = 'beanstalkd-exporter', + Stdlib::Absolutepath $config = '/etc/beanstalkd-exporter.conf', + Stdlib::Absolutepath $mapping_config = '/etc/beanstalkd-exporter-mapping.conf', + String[1] $beanstalkd_address = '127.0.0.1:11300', + String[1] $exporter_listen = ':9371', # renovate: depName=messagebird/beanstalkd_exporter String[1] $version = '1.0.5', Boolean $purge_config_dir = true, From b71f101e909c4725954a5c8f8337543304366bef Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 2 Jan 2025 14:27:07 +0100 Subject: [PATCH 4/8] node_exporter: Move data from hiera to puppet class --- REFERENCE.md | 14 ++++++++++++++ data/defaults.yaml | 7 ------- manifests/node_exporter.pp | 14 +++++++------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 754c93425..0305e2a94 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -7997,6 +7997,8 @@ Data type: `String` Extension for the release binary archive +Default value: `'tar.gz'` + ##### `download_url` Data type: `Optional[Prometheus::Uri]` @@ -8011,12 +8013,16 @@ Data type: `Prometheus::Uri` Base URL for the binary archive +Default value: `'https://github.com/prometheus/node_exporter/releases'` + ##### `extra_groups` Data type: `Array[String]` Extra groups to add the binary user to +Default value: `[]` + ##### `extra_options` Data type: `Optional[String[1]]` @@ -8031,6 +8037,8 @@ Data type: `String[1]` Group under which the binary is running +Default value: `'node-exporter'` + ##### `init_style` Data type: `Prometheus::Initstyle` @@ -8085,12 +8093,16 @@ Data type: `String[1]` If package, then use this for package ensure default 'latest' +Default value: `'latest'` + ##### `package_name` Data type: `String[1]` The binary package name - not available yet +Default value: `'node_exporter'` + ##### `purge_config_dir` Data type: `Boolean` @@ -8137,6 +8149,8 @@ Data type: `String[1]` User which runs the service +Default value: `'node-exporter'` + ##### `version` Data type: `String[1]` diff --git a/data/defaults.yaml b/data/defaults.yaml index 7146ecc4d..e6446c896 100644 --- a/data/defaults.yaml +++ b/data/defaults.yaml @@ -149,10 +149,3 @@ prometheus::mysqld_exporter::group: 'mysqld-exporter' prometheus::mysqld_exporter::package_ensure: 'latest' prometheus::mysqld_exporter::package_name: 'mysqld_exporter' prometheus::mysqld_exporter::user: 'mysqld-exporter' -prometheus::node_exporter::download_extension: 'tar.gz' -prometheus::node_exporter::download_url_base: 'https://github.com/prometheus/node_exporter/releases' -prometheus::node_exporter::extra_groups: [] -prometheus::node_exporter::group: 'node-exporter' -prometheus::node_exporter::package_ensure: 'latest' -prometheus::node_exporter::package_name: 'node_exporter' -prometheus::node_exporter::user: 'node-exporter' diff --git a/manifests/node_exporter.pp b/manifests/node_exporter.pp index 755763ea6..fbb5ce1be 100644 --- a/manifests/node_exporter.pp +++ b/manifests/node_exporter.pp @@ -70,13 +70,13 @@ # Scrape port for configuring scrape targets on the prometheus server via exported `prometheus::scrape_job` resources # If changed from default 9100 the option `--web.listen-address=':${scrape_port}'` will be added to the command line arguments class prometheus::node_exporter ( - String $download_extension, - Prometheus::Uri $download_url_base, - Array[String] $extra_groups, - String[1] $group, - String[1] $package_ensure, - String[1] $package_name, - String[1] $user, + String $download_extension = 'tar.gz', + Prometheus::Uri $download_url_base = 'https://github.com/prometheus/node_exporter/releases', + Array[String] $extra_groups = [], + String[1] $group = 'node-exporter', + String[1] $package_ensure = 'latest', + String[1] $package_name = 'node_exporter', + String[1] $user = 'node-exporter', # renovate: depName=prometheus/node_exporter String[1] $version = '1.8.1', Boolean $purge_config_dir = true, From 8c0b8a09044fb5e0b0955f18256e778384d3420e Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 2 Jan 2025 15:33:40 +0100 Subject: [PATCH 5/8] mysql_exporter: Move data from hiera to puppet class --- REFERENCE.md | 14 ++++++++++++++ data/defaults.yaml | 7 ------- manifests/mysqld_exporter.pp | 14 +++++++------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 0305e2a94..72ae775d2 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -7061,6 +7061,8 @@ Data type: `String` Extension for the release binary archive +Default value: `'tar.gz'` + ##### `download_url` Data type: `Optional[Prometheus::Uri]` @@ -7075,12 +7077,16 @@ Data type: `Prometheus::Uri` Base URL for the binary archive +Default value: `'https://github.com/prometheus/mysqld_exporter/releases'` + ##### `extra_groups` Data type: `Array` Extra groups to add the binary user to +Default value: `[]` + ##### `extra_options` Data type: `Optional[String[1]]` @@ -7095,6 +7101,8 @@ Data type: `String[1]` Group under which the binary is running +Default value: `'mysqld-exporter'` + ##### `init_style` Data type: `Prometheus::Initstyle` @@ -7149,12 +7157,16 @@ Data type: `String[1]` If package, then use this for package ensure default 'latest' +Default value: `'latest'` + ##### `package_name` Data type: `String[1]` The binary package name - not available yet +Default value: `'mysqld_exporter'` + ##### `purge_config_dir` Data type: `Boolean` @@ -7201,6 +7213,8 @@ Data type: `String[1]` User which runs the service +Default value: `'mysqld-exporter'` + ##### `version` Data type: `String[1]` diff --git a/data/defaults.yaml b/data/defaults.yaml index e6446c896..e05ec1377 100644 --- a/data/defaults.yaml +++ b/data/defaults.yaml @@ -142,10 +142,3 @@ prometheus::rabbitmq_exporter::rabbit_exporters: - 'node' - 'overview' - 'queue' -prometheus::mysqld_exporter::download_extension: 'tar.gz' -prometheus::mysqld_exporter::download_url_base: 'https://github.com/prometheus/mysqld_exporter/releases' -prometheus::mysqld_exporter::extra_groups: [] -prometheus::mysqld_exporter::group: 'mysqld-exporter' -prometheus::mysqld_exporter::package_ensure: 'latest' -prometheus::mysqld_exporter::package_name: 'mysqld_exporter' -prometheus::mysqld_exporter::user: 'mysqld-exporter' diff --git a/manifests/mysqld_exporter.pp b/manifests/mysqld_exporter.pp index f533cdeda..afe64f2a0 100644 --- a/manifests/mysqld_exporter.pp +++ b/manifests/mysqld_exporter.pp @@ -75,13 +75,13 @@ # @param cnf_ssl_key # The path name of the client SSL private key file in PEM format. class prometheus::mysqld_exporter ( - String $download_extension, - Prometheus::Uri $download_url_base, - Array $extra_groups, - String[1] $group, - String[1] $package_ensure, - String[1] $package_name, - String[1] $user, + String $download_extension = 'tar.gz', + Prometheus::Uri $download_url_base = 'https://github.com/prometheus/mysqld_exporter/releases', + Array $extra_groups = [], + String[1] $group = 'mysqld-exporter', + String[1] $package_ensure = 'latest', + String[1] $package_name = 'mysqld_exporter', + String[1] $user = 'mysqld-exporter', # renovate: depName=prometheus/mysqld_exporter String[1] $version = '0.15.1', String[1] $service_name = 'mysqld_exporter', From e06aed634ee571d37b10673b0cb750ff52a1209f Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 2 Jan 2025 15:35:43 +0100 Subject: [PATCH 6/8] pushgateway_exporter: Move data from hiera to puppet class --- REFERENCE.md | 14 ++++++++++++++ data/defaults.yaml | 7 ------- manifests/pushgateway.pp | 14 +++++++------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 72ae775d2..eda920378 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -10447,6 +10447,8 @@ Data type: `String[1]` Extension for the release binary archive +Default value: `'tar.gz'` + ##### `download_url` Data type: `Optional[String]` @@ -10461,12 +10463,16 @@ Data type: `String[1]` Base URL for the binary archive +Default value: `'https://github.com/prometheus/pushgateway/releases'` + ##### `extra_groups` Data type: `Array` Extra groups to add the binary user to +Default value: `[]` + ##### `extra_options` Data type: `Optional[String[1]]` @@ -10481,6 +10487,8 @@ Data type: `String[1]` Group under which the binary is running +Default value: `'pushgateway'` + ##### `init_style` Data type: `Prometheus::Initstyle` @@ -10535,12 +10543,16 @@ Data type: `String[1]` If package, then use this for package ensure default 'latest' +Default value: `'latest'` + ##### `package_name` Data type: `String[1]` The binary package name - not available yet +Default value: `'pushgateway'` + ##### `restart_on_change` Data type: `Boolean` @@ -10579,6 +10591,8 @@ Data type: `String[1]` User which runs the service +Default value: `'pushgateway'` + ##### `version` Data type: `String[1]` diff --git a/data/defaults.yaml b/data/defaults.yaml index e05ec1377..243f63c69 100644 --- a/data/defaults.yaml +++ b/data/defaults.yaml @@ -116,13 +116,6 @@ prometheus::process_exporter::package_name: 'process-exporter' prometheus::process_exporter::service_name: 'process-exporter' prometheus::process_exporter::user: 'process-exporter' prometheus::process_exporter::config_path: '/etc/process-exporter.yaml' -prometheus::pushgateway::download_extension: 'tar.gz' -prometheus::pushgateway::download_url_base: 'https://github.com/prometheus/pushgateway/releases' -prometheus::pushgateway::extra_groups: [] -prometheus::pushgateway::group: 'pushgateway' -prometheus::pushgateway::package_ensure: 'latest' -prometheus::pushgateway::package_name: 'pushgateway' -prometheus::pushgateway::user: 'pushgateway' prometheus::rabbitmq_exporter::download_extension: 'tar.gz' prometheus::rabbitmq_exporter::download_url_base: 'https://github.com/kbudde/rabbitmq_exporter/releases' prometheus::rabbitmq_exporter::extra_groups: [] diff --git a/manifests/pushgateway.pp b/manifests/pushgateway.pp index 3e76a60d4..3c4a5492e 100644 --- a/manifests/pushgateway.pp +++ b/manifests/pushgateway.pp @@ -48,13 +48,13 @@ # @param proxy_type # Optional proxy server type (none|http|https|ftp) class prometheus::pushgateway ( - String[1] $download_extension, - String[1] $download_url_base, - Array $extra_groups, - String[1] $group, - String[1] $package_ensure, - String[1] $package_name, - String[1] $user, + String[1] $download_extension = 'tar.gz', + String[1] $download_url_base = 'https://github.com/prometheus/pushgateway/releases', + Array $extra_groups = [], + String[1] $group = 'pushgateway', + String[1] $package_ensure = 'latest', + String[1] $package_name = 'pushgateway', + String[1] $user = 'pushgateway', # renovate: depName=prometheus/pushgateway String[1] $version = '1.9.0', Boolean $restart_on_change = true, From eb8a469db2182c5cab922a7f19c8ad9fa9de3938 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 2 Jan 2025 17:11:21 +0100 Subject: [PATCH 7/8] process_exporter: Move data from hiera to puppet class --- REFERENCE.md | 18 ++++++++++++++++++ data/defaults.yaml | 9 --------- manifests/process_exporter.pp | 18 +++++++++--------- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index eda920378..3b479fc19 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -9861,6 +9861,8 @@ Data type: `String` Extension for the release binary archive +Default value: `'tar.gz'` + ##### `download_url` Data type: `Optional[Prometheus::Uri]` @@ -9875,12 +9877,16 @@ Data type: `Prometheus::Uri` Base URL for the binary archive +Default value: `'https://github.com/ncabatoff/process-exporter/releases'` + ##### `extra_groups` Data type: `Array` Extra groups to add the binary user to +Default value: `[]` + ##### `extra_options` Data type: `Optional[String[1]]` @@ -9895,6 +9901,8 @@ Data type: `String[1]` Group under which the binary is running +Default value: `'process-exporter'` + ##### `init_style` Data type: `Prometheus::Initstyle` @@ -9949,12 +9957,16 @@ Data type: `String[1]` If package, then use this for package ensure default 'latest' +Default value: `'latest'` + ##### `package_name` Data type: `String[1]` The binary package name - not available yet +Default value: `'process-exporter'` + ##### `purge_config_dir` Data type: `Boolean` @@ -9993,12 +10005,16 @@ Data type: `String[1]` Name of the process exporter service (default 'process-exporter') +Default value: `'process-exporter'` + ##### `user` Data type: `String[1]` User which runs the service +Default value: `'process-exporter'` + ##### `version` Data type: `String[1]` @@ -10047,6 +10063,8 @@ Data type: `Stdlib::Absolutepath` +Default value: `'/etc/process-exporter.yaml'` + ##### `config_mode` Data type: `String[1]` diff --git a/data/defaults.yaml b/data/defaults.yaml index 243f63c69..8fa9f1e2b 100644 --- a/data/defaults.yaml +++ b/data/defaults.yaml @@ -107,15 +107,6 @@ prometheus::nginx_vts_exporter::package_ensure: 'latest' prometheus::nginx_vts_exporter::package_name: 'nginx-vts-exporter' prometheus::nginx_vts_exporter::service_name: 'nginx-vts-exporter' prometheus::nginx_vts_exporter::user: 'nginx-vts-exporter' -prometheus::process_exporter::download_extension: 'tar.gz' -prometheus::process_exporter::download_url_base: 'https://github.com/ncabatoff/process-exporter/releases' -prometheus::process_exporter::extra_groups: [] -prometheus::process_exporter::group: 'process-exporter' -prometheus::process_exporter::package_ensure: 'latest' -prometheus::process_exporter::package_name: 'process-exporter' -prometheus::process_exporter::service_name: 'process-exporter' -prometheus::process_exporter::user: 'process-exporter' -prometheus::process_exporter::config_path: '/etc/process-exporter.yaml' prometheus::rabbitmq_exporter::download_extension: 'tar.gz' prometheus::rabbitmq_exporter::download_url_base: 'https://github.com/kbudde/rabbitmq_exporter/releases' prometheus::rabbitmq_exporter::extra_groups: [] diff --git a/manifests/process_exporter.pp b/manifests/process_exporter.pp index c36ac9ca0..205db33a6 100644 --- a/manifests/process_exporter.pp +++ b/manifests/process_exporter.pp @@ -75,15 +75,15 @@ # ] # } class prometheus::process_exporter ( - String $download_extension, - Prometheus::Uri $download_url_base, - Array $extra_groups, - String[1] $group, - String[1] $package_ensure, - String[1] $package_name, - String[1] $service_name, - String[1] $user, - Stdlib::Absolutepath $config_path, + String $download_extension = 'tar.gz', + Prometheus::Uri $download_url_base = 'https://github.com/ncabatoff/process-exporter/releases', + Array $extra_groups = [], + String[1] $group = 'process-exporter', + String[1] $package_ensure = 'latest', + String[1] $package_name = 'process-exporter', + String[1] $service_name = 'process-exporter', + String[1] $user = 'process-exporter', + Stdlib::Absolutepath $config_path = '/etc/process-exporter.yaml', # renovate: depName=ncabatoff/process-exporter String[1] $version = '0.8.2', Array $watched_processes = [], From 7a42be4063ff3c3e4e1578c2d52989047fe8c89a Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 2 Jan 2025 17:19:16 +0100 Subject: [PATCH 8/8] haproxy_exporter: Move data from hiera to puppet class --- REFERENCE.md | 18 ++++++++++++++++++ data/defaults.yaml | 9 --------- manifests/haproxy_exporter.pp | 18 +++++++++--------- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 3b479fc19..d7832047e 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -4741,12 +4741,16 @@ Data type: `Variant[Stdlib::HTTPUrl, Pattern[/unix:(?:\/.+)+/]]` The URI to obtain HAProxy stats from +Default value: `'http://localhost:1234/haproxy?stats;csv'` + ##### `download_extension` Data type: `String` Extension for the release binary archive +Default value: `'tar.gz'` + ##### `download_url` Data type: `Optional[Prometheus::Uri]` @@ -4761,12 +4765,16 @@ Data type: `Prometheus::Uri` Base URL for the binary archive +Default value: `'https://github.com/prometheus/haproxy_exporter/releases'` + ##### `extra_groups` Data type: `Array` Extra groups to add the binary user to +Default value: `[]` + ##### `extra_options` Data type: `Optional[String[1]]` @@ -4781,6 +4789,8 @@ Data type: `String[1]` Group under which the binary is running +Default value: `'haproxy-exporter'` + ##### `init_style` Data type: `Prometheus::Initstyle` @@ -4835,12 +4845,16 @@ Data type: `String[1]` If package, then use this for package ensure default 'latest' +Default value: `'latest'` + ##### `package_name` Data type: `String[1]` The binary package name - not available yet +Default value: `'haproxy_exporter'` + ##### `purge_config_dir` Data type: `Boolean` @@ -4879,12 +4893,16 @@ Data type: `String[1]` Name of the haproxy exporter service (default 'haproxy_exporter') +Default value: `'haproxy_exporter'` + ##### `user` Data type: `String[1]` User which runs the service +Default value: `'haproxy-user'` + ##### `version` Data type: `String[1]` diff --git a/data/defaults.yaml b/data/defaults.yaml index 8fa9f1e2b..66a0b4ef1 100644 --- a/data/defaults.yaml +++ b/data/defaults.yaml @@ -89,15 +89,6 @@ prometheus::mesos_exporter::user: 'mesos-exporter' prometheus::mesos_exporter::package_ensure: 'latest' prometheus::mesos_exporter::package_name: 'mesos_exporter' prometheus::mesos_exporter::service_name: 'mesos_exporter' -prometheus::haproxy_exporter::cnf_scrape_uri: 'http://localhost:1234/haproxy?stats;csv' -prometheus::haproxy_exporter::download_extension: 'tar.gz' -prometheus::haproxy_exporter::download_url_base: 'https://github.com/prometheus/haproxy_exporter/releases' -prometheus::haproxy_exporter::extra_groups: [] -prometheus::haproxy_exporter::group: 'haproxy-exporter' -prometheus::haproxy_exporter::package_ensure: 'latest' -prometheus::haproxy_exporter::package_name: 'haproxy_exporter' -prometheus::haproxy_exporter::service_name: 'haproxy_exporter' -prometheus::haproxy_exporter::user: 'haproxy-user' prometheus::nginx_vts_exporter::nginx_scrape_uri: 'http://localhost/status/format/json' prometheus::nginx_vts_exporter::download_extension: 'tar.gz' prometheus::nginx_vts_exporter::download_url_base: 'https://github.com/hnlq715/nginx-vts-exporter/releases' diff --git a/manifests/haproxy_exporter.pp b/manifests/haproxy_exporter.pp index 145e1d811..c32ae27be 100644 --- a/manifests/haproxy_exporter.pp +++ b/manifests/haproxy_exporter.pp @@ -58,15 +58,15 @@ # @note # This class is deprecated. class prometheus::haproxy_exporter ( - Variant[Stdlib::HTTPUrl, Pattern[/unix:(?:\/.+)+/]] $cnf_scrape_uri, - String $download_extension, - Array $extra_groups, - String[1] $group, - String[1] $package_ensure, - String[1] $package_name, - String[1] $user, - String[1] $service_name, - Prometheus::Uri $download_url_base, + Variant[Stdlib::HTTPUrl, Pattern[/unix:(?:\/.+)+/]] $cnf_scrape_uri = 'http://localhost:1234/haproxy?stats;csv', + String $download_extension = 'tar.gz', + Array $extra_groups = [], + String[1] $group = 'haproxy-exporter', + String[1] $package_ensure = 'latest', + String[1] $package_name = 'haproxy_exporter', + String[1] $user = 'haproxy-user', + String[1] $service_name = 'haproxy_exporter', + Prometheus::Uri $download_url_base = 'https://github.com/prometheus/haproxy_exporter/releases', # renovate: depName=prometheus/haproxy_exporter String[1] $version = '0.15.0', Boolean $purge_config_dir = true,