Showing with 65 additions and 5 deletions.
  1. +9 −0 CHANGELOG.md
  2. +18 −3 REFERENCE.md
  3. +4 −1 manifests/dellhw_exporter.pp
  4. +1 −0 manifests/init.pp
  5. +1 −1 metadata.json
  6. +30 −0 spec/type_aliases/gsuri_spec.rb
  7. +1 −0 types/gsuri.pp
  8. +1 −0 types/uri.pp
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v10.1.0](https://github.com/voxpupuli/puppet-prometheus/tree/v10.1.0) (2020-08-21)

[Full Changelog](https://github.com/voxpupuli/puppet-prometheus/compare/v10.0.0...v10.1.0)

**Implemented enhancements:**

- Add support for Google Cloud gs storage [\#485](https://github.com/voxpupuli/puppet-prometheus/pull/485) ([j0sh3rs](https://github.com/j0sh3rs))
- prometheus::dellhw\_exporter: Add scrape\_ipadress parameter [\#484](https://github.com/voxpupuli/puppet-prometheus/pull/484) ([lconsuegra](https://github.com/lconsuegra))

## [v10.0.0](https://github.com/voxpupuli/puppet-prometheus/tree/v10.0.0) (2020-08-15)

[Full Changelog](https://github.com/voxpupuli/puppet-prometheus/compare/v9.1.0...v10.0.0)
Expand Down
21 changes: 18 additions & 3 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ This can be used to make prometheus find instances of your running service or ap

### Data types

* [`Prometheus::GsUri`](#prometheusgsuri)
* [`Prometheus::Initstyle`](#prometheusinitstyle)
* [`Prometheus::S3Uri`](#prometheuss3uri)
* [`Prometheus::Uri`](#prometheusuri)
Expand Down Expand Up @@ -704,7 +705,7 @@ Default value: ``true``

Data type: `Array`


Extra groups of which the user should be a part

##### `env_file_path`

Expand Down Expand Up @@ -2405,7 +2406,7 @@ Data type: `String[1]`

Base URL for the binary archive

Default value: `'https://github.com/galexrt/dellhw-exporter/releases'`
Default value: `'https://github.com/galexrt/dellhw_exporter/releases'`

##### `extra_groups`

Expand Down Expand Up @@ -2559,6 +2560,14 @@ The file path to the omReport executable (default "/opt/dell/srvadmin/bin/omrepo

Default value: `'/opt/dell/srvadmin/bin/omreport'`

##### `scrape_ipadress`

Data type: `String`

The ip address that the exporter will to listen to (default '')

Default value: `''`

##### `export_scrape_job`

Data type: `Boolean`
Expand Down Expand Up @@ -8260,6 +8269,12 @@ Default value: ``undef``

## Data types

### `Prometheus::GsUri`

The Prometheus::GsUri data type.

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

### `Prometheus::Initstyle`

The Prometheus::Initstyle data type.
Expand All @@ -8276,5 +8291,5 @@ Alias of `Pattern[/^s3:\/\//]`

The Prometheus::Uri data type.

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

5 changes: 4 additions & 1 deletion manifests/dellhw_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
# The binary release version
# @param omreport_path
# The file path to the omReport executable (default "/opt/dell/srvadmin/bin/omreport")
# @param scrape_ipadress
# The ip address that the exporter will to listen to (default '')
class prometheus::dellhw_exporter (
String[1] $download_extension = 'tar.gz',
String[1] $download_url_base = 'https://github.com/galexrt/dellhw_exporter/releases',
Expand All @@ -73,6 +75,7 @@
String[1] $bin_dir = $prometheus::bin_dir,
Boolean $export_scrape_job = false,
Stdlib::Port $scrape_port = 9137,
String $scrape_ipadress = '',
String[1] $scrape_job_name = 'dellhw',
Optional[Hash] $scrape_job_labels = undef,
Optional[String[1]] $bin_name = undef,
Expand All @@ -86,7 +89,7 @@
}

$real_omreport_path = "--collectors-omreport=${omreport_path}"
$real_scrape_port = "--web-listen-address=:${scrape_port}"
$real_scrape_port = "--web-listen-address=${$scrape_ipadress}:${scrape_port}"
$options = join([$extra_options, $real_omreport_path, $real_scrape_port], ' ')

prometheus::daemon { $service_name:
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@
# Output format of log messages. One of: [logfmt, json]
# @param config_show_diff
# Whether to show prometheus configuration file diff in the Puppet logs.
# @param extra_groups Extra groups of which the user should be a part
class prometheus (
String $user,
String $group,
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-prometheus",
"version": "10.0.0",
"version": "10.1.0",
"author": "Vox Pupuli",
"summary": "This module installs, configures and manages the Prometheus service.",
"license": "Apache-2.0",
Expand Down
30 changes: 30 additions & 0 deletions spec/type_aliases/gsuri_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
require 'spec_helper'

describe 'Prometheus::GsUri' do
describe 'accepts case-sensitive google cloud services gs uris' do
[
'gs://bucket-name/path',
'gs://bucket/path/to/file.txt'
].each do |value|
describe value.inspect do
it { is_expected.to allow_value(value) }
end
end
end

describe 'rejects other values' do
[
'',
'GS://bucket-name/path',
3,
'gs:/bucket-name/path',
'gs//bucket-name/path',
'gs:bucket-name/path',
'gs-bucket-name/path'
].each do |value|
describe value.inspect do
it { is_expected.not_to allow_value(value) }
end
end
end
end
1 change: 1 addition & 0 deletions types/gsuri.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
type Prometheus::GsUri = Pattern[/^gs:\/\//]
1 change: 1 addition & 0 deletions types/uri.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
Stdlib::HTTPUrl,
Stdlib::HTTPSUrl,
Prometheus::S3Uri,
Prometheus::GsUri,
]