Skip to content

Commit

Permalink
haproxy_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 eb8a469 commit 7a42be4
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
18 changes: 18 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'`

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

Data type: `String`

Extension for the release binary archive

Default value: `'tar.gz'`

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

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

Base URL for the binary archive

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

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

Data type: `Array`

Extra groups to add the binary user to

Default value: `[]`

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

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

Group under which the binary is running

Default value: `'haproxy-exporter'`

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

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

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

Default value: `'latest'`

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

Data type: `String[1]`

The binary package name - not available yet

Default value: `'haproxy_exporter'`

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

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

Name of the haproxy exporter service (default 'haproxy_exporter')

Default value: `'haproxy_exporter'`

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

Data type: `String[1]`

User which runs the service

Default value: `'haproxy-user'`

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

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

0 comments on commit 7a42be4

Please sign in to comment.