Skip to content

Commit

Permalink
snmp_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 06b219d commit cf9b55d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 22 deletions.
24 changes: 22 additions & 2 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12568,6 +12568,8 @@ Data type: `Stdlib::Absolutepath`

Absolute path to configuration file

Default value: `'/etc/snmp-exporter.yaml'`

##### <a name="-prometheus--snmp_exporter--config_mode"></a>`config_mode`

Data type: `String[1]`
Expand All @@ -12578,16 +12580,20 @@ Default value: `$prometheus::config_mode`

##### <a name="-prometheus--snmp_exporter--config_template"></a>`config_template`

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

Configuration template to use. If empty, uses upstream config (default "")

Default value: `''`

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

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

Extension for the release binary archive

Default value: `'tar.gz'`

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

Data type: `Optional[Prometheus::Uri]`
Expand All @@ -12602,12 +12608,16 @@ Data type: `Prometheus::Uri`

Base URL for the binary archive

Default value: `'https://github.com/prometheus/snmp_exporter/releases'`

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

Data type: `Array`

Extra groups to add the binary user to

Default value: `[]`

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

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

Group under which the binary is running

Default value: `snmp-exporter`

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

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

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

Default value: `'latest'`

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

Data type: `String[1]`

The binary package name - not available yet

Default value: `'snmp_exporter'`

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

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

Name of the snmp exporter service (default 'snmp_exporter')

Default value: `'snmp_exporter'`

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

Data type: `String[1]`

User which runs the service

Default value: `'snmp-exporter'`

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

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

Check warning on line 60 in manifests/snmp_exporter.pp

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

class parameter with String type defaults to empty string (check: 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,
Expand Down

0 comments on commit cf9b55d

Please sign in to comment.