Skip to content

Commit

Permalink
beanstalkd_exporter: Move data from hiera to puppet class
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jan 2, 2025
1 parent f216bae commit fbff15a
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 27 deletions.
30 changes: 27 additions & 3 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1705,34 +1705,44 @@ Default value: `$prometheus::bin_dir`

##### <a name="-prometheus--beanstalkd_exporter--config"></a>`config`

Data type: `String[1]`
Data type: `Stdlib::Absolutepath`

Path to configuration file that stores beanstalkd address

Default value: `'/etc/beanstalkd-exporter.conf'`

##### <a name="-prometheus--beanstalkd_exporter--mapping_config"></a>`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'`

##### <a name="-prometheus--beanstalkd_exporter--beanstalkd_address"></a>`beanstalkd_address`

Data type: `String[1]`

Address of beanstalkd, defaults to localhost

Default value: `'127.0.0.1:11300'`

##### <a name="-prometheus--beanstalkd_exporter--exporter_listen"></a>`exporter_listen`

Data type: `String[1]`

Address to bind beanstalkd_exporter to. Default is different than upstream (*:9371)

Default value: `':9371'`

##### <a name="-prometheus--beanstalkd_exporter--download_extension"></a>`download_extension`

Data type: `String`
Data type: `String[0]`

Extension for the release binary archive

Default value: `''`

##### <a name="-prometheus--beanstalkd_exporter--download_url"></a>`download_url`

Data type: `Variant[Undef,String]`
Expand All @@ -1747,12 +1757,16 @@ Data type: `Prometheus::Uri`

Base URL for the binary archive

Default value: `'https://github.com/messagebird/beanstalkd_exporter/releases'`

##### <a name="-prometheus--beanstalkd_exporter--extra_groups"></a>`extra_groups`

Data type: `Array`

Extra groups to add the binary user to

Default value: `[]`

##### <a name="-prometheus--beanstalkd_exporter--extra_options"></a>`extra_options`

Data type: `Optional[String[1]]`
Expand All @@ -1767,6 +1781,8 @@ Data type: `String[1]`

Group under which the binary is running

Default value: `'beanstalkd-exporter'`

##### <a name="-prometheus--beanstalkd_exporter--init_style"></a>`init_style`

Data type: `Prometheus::Initstyle`
Expand Down Expand Up @@ -1821,12 +1837,16 @@ Data type: `String[1]`

If package, then use this for package ensure default 'latest'

Default value: `'latest'`

##### <a name="-prometheus--beanstalkd_exporter--package_name"></a>`package_name`

Data type: `String[1]`

The binary package name - not available yet

Default value: `'beanstalkd_exporter'`

##### <a name="-prometheus--beanstalkd_exporter--purge_config_dir"></a>`purge_config_dir`

Data type: `Boolean`
Expand Down Expand Up @@ -1865,12 +1885,16 @@ Data type: `String[1]`

Name of the beanstalkd exporter service (default 'beanstalkd_exporter')

Default value: `'beanstalkd_exporter'`

##### <a name="-prometheus--beanstalkd_exporter--user"></a>`user`

Data type: `String[1]`

User which runs the service

Default value: `'beanstalkd-exporter'`

##### <a name="-prometheus--beanstalkd_exporter--version"></a>`version`

Data type: `String[1]`
Expand Down
12 changes: 0 additions & 12 deletions data/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
24 changes: 12 additions & 12 deletions manifests/beanstalkd_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fbff15a

Please sign in to comment.