Skip to content

Commit

Permalink
stats_exporter: Move data from hiera to puppet class
Browse files Browse the repository at this point in the history
This enables puppet-strings to pick up the data. There is no
OS-specific data in hiera:

```
$ git grep statsd data/
$
```
  • Loading branch information
bastelfreak committed Jan 2, 2025
1 parent 998cbfa commit b94b379
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 20 deletions.
20 changes: 20 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13492,6 +13492,8 @@ Data type: `String`

Extension for the release binary archive

Default value: `'tar.gz'`

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

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

Base URL for the binary archive

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

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

Data type: `Array`

Extra groups to add the binary user to

Default value: `[]`

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

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

Group under which the binary is running

Default value: `'statsd-exporter'`

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

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

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

Default value: `'latest'`

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

Data type: `String[1]`

The binary package name - not available yet

Default value: `'statsd_exporter'`

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

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

Name of the statsd exporter service (default 'statsd_exporter')

Default value: `'statsd_exporter'`

##### <a name="-prometheus--statsd_exporter--mappings"></a>`mappings`

Data type: `Array[Hash]`
Expand All @@ -13635,12 +13649,16 @@ The hiera array for mappings:
processor: '$2'
action: '$1'

Default value: `[]`

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

Data type: `String[1]`

User which runs the service

Default value: `'statsd-exporter'`

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

Data type: `String[1]`
Expand Down Expand Up @@ -13671,6 +13689,8 @@ Data type: `Stdlib::Absolutepath`



Default value: `'/etc/statsd-exporter-mapping.yaml'`

##### <a name="-prometheus--statsd_exporter--export_scrape_job"></a>`export_scrape_job`

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

0 comments on commit b94b379

Please sign in to comment.