Skip to content

Commit

Permalink
node_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 fbff15a commit b71f101
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
14 changes: 14 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7997,6 +7997,8 @@ Data type: `String`

Extension for the release binary archive

Default value: `'tar.gz'`

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

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

Base URL for the binary archive

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

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

Data type: `Array[String]`

Extra groups to add the binary user to

Default value: `[]`

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

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

Group under which the binary is running

Default value: `'node-exporter'`

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

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

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

Default value: `'latest'`

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

Data type: `String[1]`

The binary package name - not available yet

Default value: `'node_exporter'`

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

Data type: `Boolean`
Expand Down Expand Up @@ -8137,6 +8149,8 @@ Data type: `String[1]`

User which runs the service

Default value: `'node-exporter'`

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

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

0 comments on commit b71f101

Please sign in to comment.