Skip to content

Commit

Permalink
Merge pull request #700 from JGodin-C2C/fix_ci
Browse files Browse the repository at this point in the history
Update puppet-strings documentation
  • Loading branch information
bastelfreak authored Nov 2, 2023
2 parents e31bec4 + a3f205a commit 562b053
Show file tree
Hide file tree
Showing 10 changed files with 122 additions and 94 deletions.
170 changes: 89 additions & 81 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
* [`prometheus::graphite_exporter`](#prometheus--graphite_exporter): This module manages prometheus node graphite_exporter
* [`prometheus::grok_exporter`](#prometheus--grok_exporter): This module manages prometheus grok_exporter
* [`prometheus::haproxy_exporter`](#prometheus--haproxy_exporter): This module manages prometheus haproxy_exporter
* [`prometheus::install`](#prometheus--install): Install prometheus via different methods with parameters from init
Currently only the install from url is implemented, when Prometheus will deliver packages for some Linux distros I will
implement the package install method as well
The package method needs specific yum or apt repo settings which are not made yet by the module
* [`prometheus::install`](#prometheus--install): Install prometheus
* [`prometheus::ipmi_exporter`](#prometheus--ipmi_exporter): This module manages prometheus node ipmi_exporter (https://github.com/soundcloud/ipmi_exporter)
* [`prometheus::ipsec_exporter`](#prometheus--ipsec_exporter): This module manages prometheus node ipsec_exporter
* [`prometheus::jmx_exporter`](#prometheus--jmx_exporter): Installs and configures the Prometheus JMX exporter
Expand Down Expand Up @@ -56,7 +53,7 @@ The package method needs specific yum or apt repo settings which are not made ye
* [`prometheus::ssh_exporter`](#prometheus--ssh_exporter): This module manages prometheus ssh_exporter (https://github.com/treydock/ssh_exporter)
* [`prometheus::ssl_exporter`](#prometheus--ssl_exporter): This module manages prometheus ssl_exporter (https://github.com/ribbybibby/ssl_exporter)
* [`prometheus::statsd_exporter`](#prometheus--statsd_exporter): This module manages prometheus statsd_exporter
* [`prometheus::unbound_exporter`](#prometheus--unbound_exporter): This module manages prometheus unbound exporter. The exporter needs to be compiled by hand! (https://github.com/kumina/unbound_exporter/issues/21)
* [`prometheus::unbound_exporter`](#prometheus--unbound_exporter): This module manages prometheus unbound exporter.
* [`prometheus::varnish_exporter`](#prometheus--varnish_exporter): This module manages prometheus varnish_exporter

#### Private Classes
Expand All @@ -68,17 +65,15 @@ restarting the whole service when a config changes

* [`prometheus::alerts`](#prometheus--alerts): This module manages prometheus alert files for prometheus
* [`prometheus::daemon`](#prometheus--daemon): This define managed prometheus daemons that don't have their own class
* [`prometheus::scrape_job`](#prometheus--scrape_job): This define is used to export prometheus scrape settings from nodes to be scraped to the node
running prometheus itself.
This can be used to make prometheus find instances of your running service or application.
* [`prometheus::scrape_job`](#prometheus--scrape_job): This module manages prometheus scrape jobs.

### Data types

* [`Prometheus::GsUri`](#Prometheus--GsUri)
* [`Prometheus::Initstyle`](#Prometheus--Initstyle)
* [`Prometheus::GsUri`](#Prometheus--GsUri): Type for a Google Cloud Storage URI
* [`Prometheus::Initstyle`](#Prometheus--Initstyle): A type to represent the init style of a Prometheus service
* [`Prometheus::Install`](#Prometheus--Install): type to enforce the different installation methods for our exporters.
* [`Prometheus::S3Uri`](#Prometheus--S3Uri)
* [`Prometheus::Uri`](#Prometheus--Uri)
* [`Prometheus::S3Uri`](#Prometheus--S3Uri): Type for S3 URIs
* [`Prometheus::Uri`](#Prometheus--Uri): A URI that can be used to fetch a Prometheus configuration file

## Classes

Expand Down Expand Up @@ -980,11 +975,13 @@ The following parameters are available in the `prometheus::alertmanager` class:
* [`os`](#-prometheus--alertmanager--os)
* [`package_ensure`](#-prometheus--alertmanager--package_ensure)
* [`package_name`](#-prometheus--alertmanager--package_name)
* [`config_dir`](#-prometheus--alertmanager--config_dir)
* [`purge_config_dir`](#-prometheus--alertmanager--purge_config_dir)
* [`manage_config`](#-prometheus--alertmanager--manage_config)
* [`validate_config`](#-prometheus--alertmanager--validate_config)
* [`receivers`](#-prometheus--alertmanager--receivers)
* [`restart_on_change`](#-prometheus--alertmanager--restart_on_change)
* [`reload_on_change`](#-prometheus--alertmanager--reload_on_change)
* [`route`](#-prometheus--alertmanager--route)
* [`service_enable`](#-prometheus--alertmanager--service_enable)
* [`service_ensure`](#-prometheus--alertmanager--service_ensure)
Expand All @@ -995,8 +992,6 @@ The following parameters are available in the `prometheus::alertmanager` class:
* [`version`](#-prometheus--alertmanager--version)
* [`proxy_server`](#-prometheus--alertmanager--proxy_server)
* [`proxy_type`](#-prometheus--alertmanager--proxy_type)
* [`config_dir`](#-prometheus--alertmanager--config_dir)
* [`reload_on_change`](#-prometheus--alertmanager--reload_on_change)

##### <a name="-prometheus--alertmanager--arch"></a>`arch`

Expand Down Expand Up @@ -1172,6 +1167,12 @@ Data type: `String[1]`

The binary package name - not available yet

##### <a name="-prometheus--alertmanager--config_dir"></a>`config_dir`

Data type: `Stdlib::Absolutepath`

The directory to put the configuration files

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

Data type: `Boolean`
Expand Down Expand Up @@ -1215,6 +1216,14 @@ Should puppet restart the service on configuration change? (default true)

Default value: `true`

##### <a name="-prometheus--alertmanager--reload_on_change"></a>`reload_on_change`

Data type: `Boolean`

Should puppet reload the service on configuration change? (default false)

Default value: `false`

##### <a name="-prometheus--alertmanager--route"></a>`route`

Data type: `Hash`
Expand Down Expand Up @@ -1295,20 +1304,6 @@ Optional proxy server type (none|http|https|ftp)

Default value: `undef`

##### <a name="-prometheus--alertmanager--config_dir"></a>`config_dir`

Data type: `Stdlib::Absolutepath`



##### <a name="-prometheus--alertmanager--reload_on_change"></a>`reload_on_change`

Data type: `Boolean`



Default value: `false`

### <a name="prometheus--apache_exporter"></a>`prometheus::apache_exporter`

This module manages prometheus apache_exporter
Expand Down Expand Up @@ -2514,8 +2509,6 @@ Default value: `undef`

### <a name="prometheus--blackbox_exporter"></a>`prometheus::blackbox_exporter`

Example for configuring named blackbox modules via hiera
details of the format: https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md
prometheus::blackbox_exporter::modules:
simple_ssl:
prober: http
Expand All @@ -2526,6 +2519,15 @@ prometheus::blackbox_exporter::modules:
prober: tcp
tcp:
preferred_ip_protocol: ip4
@ see https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md

#### Examples

##### Example for configuring named blackbox modules via hiera

```puppet

```

#### Parameters

Expand All @@ -2546,6 +2548,11 @@ The following parameters are available in the `prometheus::blackbox_exporter` cl
* [`manage_service`](#-prometheus--blackbox_exporter--manage_service)
* [`manage_user`](#-prometheus--blackbox_exporter--manage_user)
* [`modules`](#-prometheus--blackbox_exporter--modules)
* [`export_scrape_job`](#-prometheus--blackbox_exporter--export_scrape_job)
* [`scrape_host`](#-prometheus--blackbox_exporter--scrape_host)
* [`scrape_port`](#-prometheus--blackbox_exporter--scrape_port)
* [`scrape_job_name`](#-prometheus--blackbox_exporter--scrape_job_name)
* [`scrape_job_labels`](#-prometheus--blackbox_exporter--scrape_job_labels)
* [`os`](#-prometheus--blackbox_exporter--os)
* [`package_ensure`](#-prometheus--blackbox_exporter--package_ensure)
* [`package_name`](#-prometheus--blackbox_exporter--package_name)
Expand All @@ -2558,11 +2565,6 @@ The following parameters are available in the `prometheus::blackbox_exporter` cl
* [`config_mode`](#-prometheus--blackbox_exporter--config_mode)
* [`proxy_server`](#-prometheus--blackbox_exporter--proxy_server)
* [`proxy_type`](#-prometheus--blackbox_exporter--proxy_type)
* [`export_scrape_job`](#-prometheus--blackbox_exporter--export_scrape_job)
* [`scrape_host`](#-prometheus--blackbox_exporter--scrape_host)
* [`scrape_port`](#-prometheus--blackbox_exporter--scrape_port)
* [`scrape_job_name`](#-prometheus--blackbox_exporter--scrape_job_name)
* [`scrape_job_labels`](#-prometheus--blackbox_exporter--scrape_job_labels)

##### <a name="-prometheus--blackbox_exporter--arch"></a>`arch`

Expand Down Expand Up @@ -2684,6 +2686,46 @@ Structured, array of blackbox module definitions for different probe types

Default value: `{}`

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

Data type: `Boolean`

Whether to export a scrape job for this service

Default value: `false`

##### <a name="-prometheus--blackbox_exporter--scrape_host"></a>`scrape_host`

Data type: `Optional[Stdlib::Host]`

Hostname or IP address to scrape

Default value: `undef`

##### <a name="-prometheus--blackbox_exporter--scrape_port"></a>`scrape_port`

Data type: `Stdlib::Port`

Host port to scrape

Default value: `9115`

##### <a name="-prometheus--blackbox_exporter--scrape_job_name"></a>`scrape_job_name`

Data type: `String[1]`

Name of the scrape job to export, if export_scrape_job is true

Default value: `'blackbox'`

##### <a name="-prometheus--blackbox_exporter--scrape_job_labels"></a>`scrape_job_labels`

Data type: `Optional[Hash]`

Labels to add to the scrape job, if export_scrape_job is true

Default value: `undef`

##### <a name="-prometheus--blackbox_exporter--os"></a>`os`

Data type: `String[1]`
Expand Down Expand Up @@ -2778,46 +2820,6 @@ Data type: `Optional[Enum['none', 'http', 'https', 'ftp']]`

Optional proxy server type (none|http|https|ftp)

Default value: `undef`

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

Data type: `Boolean`



Default value: `false`

##### <a name="-prometheus--blackbox_exporter--scrape_host"></a>`scrape_host`

Data type: `Optional[Stdlib::Host]`



Default value: `undef`

##### <a name="-prometheus--blackbox_exporter--scrape_port"></a>`scrape_port`

Data type: `Stdlib::Port`



Default value: `9115`

##### <a name="-prometheus--blackbox_exporter--scrape_job_name"></a>`scrape_job_name`

Data type: `String[1]`



Default value: `'blackbox'`

##### <a name="-prometheus--blackbox_exporter--scrape_job_labels"></a>`scrape_job_labels`

Data type: `Optional[Hash]`



Default value: `undef`

### <a name="prometheus--collectd_exporter"></a>`prometheus::collectd_exporter`
Expand Down Expand Up @@ -4826,8 +4828,10 @@ Default value: `undef`
### <a name="prometheus--install"></a>`prometheus::install`

Install prometheus via different methods with parameters from init

Currently only the install from url is implemented, when Prometheus will deliver packages for some Linux distros I will
implement the package install method as well

The package method needs specific yum or apt repo settings which are not made yet by the module

### <a name="prometheus--ipmi_exporter"></a>`prometheus::ipmi_exporter`
Expand Down Expand Up @@ -13327,7 +13331,9 @@ Default value: `undef`

### <a name="prometheus--unbound_exporter"></a>`prometheus::unbound_exporter`

This module manages prometheus unbound exporter. The exporter needs to be compiled by hand! (https://github.com/kumina/unbound_exporter/issues/21)
This module manages prometheus unbound exporter.

* **Note** The exporter needs to be compiled by hand! (https://github.com/kumina/unbound_exporter/issues/21)

* **See also**
* https://github.com/kumina/unbound_exporter
Expand Down Expand Up @@ -14285,7 +14291,9 @@ Default value: `$prometheus::usershell`

### <a name="prometheus--scrape_job"></a>`prometheus::scrape_job`

This define is used to export prometheus scrape settings from nodes to be scraped to the node
This module manages prometheus scrape jobs.

* **Note** This define is used to export prometheus scrape settings from nodes to be scraped to the node
running prometheus itself.
This can be used to make prometheus find instances of your running service or application.

Expand Down Expand Up @@ -14332,13 +14340,13 @@ Default value: `undef`

### <a name="Prometheus--GsUri"></a>`Prometheus::GsUri`

The Prometheus::GsUri data type.
Type for a Google Cloud Storage URI

Alias of `Pattern[/^gs:\/\//]`

### <a name="Prometheus--Initstyle"></a>`Prometheus::Initstyle`

The Prometheus::Initstyle data type.
A type to represent the init style of a Prometheus service

Alias of `Enum['sysv', 'systemd', 'sles', 'launchd', 'upstart', 'none']`

Expand All @@ -14350,13 +14358,13 @@ Alias of `Enum['url', 'package', 'none']`

### <a name="Prometheus--S3Uri"></a>`Prometheus::S3Uri`

The Prometheus::S3Uri data type.
Type for S3 URIs

Alias of `Pattern[/^s3:\/\//]`

### <a name="Prometheus--Uri"></a>`Prometheus::Uri`

The Prometheus::Uri data type.
A URI that can be used to fetch a Prometheus configuration file

Alias of `Variant[Stdlib::Filesource, Stdlib::HTTPUrl, Stdlib::HTTPSUrl, Prometheus::S3Uri, Prometheus::GsUri]`

4 changes: 4 additions & 0 deletions manifests/alertmanager.pp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
# If package, then use this for package ensure default 'latest'
# @param package_name
# The binary package name - not available yet
# @param config_dir
# The directory to put the configuration files
# @param purge_config_dir
# Purge config files no longer generated by Puppet
# @param manage_config
Expand All @@ -83,6 +85,8 @@
# - to: 'root@localhost'
# @param restart_on_change
# Should puppet restart the service on configuration change? (default true)
# @param reload_on_change
# Should puppet reload the service on configuration change? (default false)
# @param route
# The top level route.
# Example (also default):
Expand Down
15 changes: 12 additions & 3 deletions manifests/blackbox_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@
# Whether to create user or rely on external code for that
# @param modules
# Structured, array of blackbox module definitions for different probe types
# @param export_scrape_job
# Whether to export a scrape job for this service
# @param scrape_host
# Hostname or IP address to scrape
# @param scrape_port
# Host port to scrape
# @param scrape_job_name
# Name of the scrape job to export, if export_scrape_job is true
# @param scrape_job_labels
# Labels to add to the scrape job, if export_scrape_job is true
# @param os
# Operating system (linux is the only one supported)
# @param package_ensure
Expand All @@ -53,9 +63,7 @@
# Optional proxy server, with port number if needed. ie: https://example.com:8080
# @param proxy_type
# Optional proxy server type (none|http|https|ftp)
# Example for configuring named blackbox modules via hiera
# details of the format: https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md
# @example
# @example Example for configuring named blackbox modules via hiera
# prometheus::blackbox_exporter::modules:
# simple_ssl:
# prober: http
Expand All @@ -66,6 +74,7 @@
# prober: tcp
# tcp:
# preferred_ip_protocol: ip4
# @ see https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md
class prometheus::blackbox_exporter (
Stdlib::Absolutepath $config_file = '/etc/blackbox-exporter.yaml',
String $download_extension = 'tar.gz',
Expand Down
13 changes: 8 additions & 5 deletions manifests/install.pp
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# @summary
# Install prometheus via different methods with parameters from init
# Currently only the install from url is implemented, when Prometheus will deliver packages for some Linux distros I will
# implement the package install method as well
# The package method needs specific yum or apt repo settings which are not made yet by the module
# @summary Install prometheus
#
# Install prometheus via different methods with parameters from init
#
# Currently only the install from url is implemented, when Prometheus will deliver packages for some Linux distros I will
# implement the package install method as well
#
# The package method needs specific yum or apt repo settings which are not made yet by the module
class prometheus::install {
assert_private()

Expand Down
Loading

0 comments on commit 562b053

Please sign in to comment.