Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for prometheus::dellhw_exporter not working as is #480

Merged
merged 3 commits into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}"
bastelfreak marked this conversation as resolved.
Show resolved Hide resolved
$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