Skip to content

Commit

Permalink
Merge pull request #480 from lconsuegra/master
Browse files Browse the repository at this point in the history
Fixes for prometheus::dellhw_exporter not working as is
  • Loading branch information
bastelfreak authored Aug 13, 2020
2 parents 22bcfd3 + eec8ec2 commit 087e763
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manifests/dellhw_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# The file path to the omReport executable (default "/opt/dell/srvadmin/bin/omreport")
class prometheus::dellhw_exporter (
String[1] $download_extension = 'tar.gz',
String[1] $download_url_base = 'https://github.com/galexrt/dellhw-exporter/releases',
String[1] $download_url_base = 'https://github.com/galexrt/dellhw_exporter/releases',
Array[String] $extra_groups = [],
String[1] $group = 'dellhw-exporter',
String[1] $package_ensure = 'present',
Expand Down Expand Up @@ -86,7 +86,7 @@
}

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

prometheus::daemon { $service_name:
Expand Down
19 changes: 19 additions & 0 deletions spec/acceptance/dellhw_exporter_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require 'spec_helper_acceptance'

describe 'prometheus dellhw_exporter' do
it 'dellhw_exporter works idempotently with no errors' do
pp = 'include prometheus::dellhw_exporter'
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end

describe service('dellhw_exporter') do
it { is_expected.to be_running }
it { is_expected.to be_enabled }
end

describe port(9137) do
it { is_expected.to be_listening.with('tcp6') }
end
end

0 comments on commit 087e763

Please sign in to comment.