diff --git a/test/integration/repo/controls/service_spec.rb b/test/integration/repo/controls/service_spec.rb index 2e4803a..063795a 100644 --- a/test/integration/repo/controls/service_spec.rb +++ b/test/integration/repo/controls/service_spec.rb @@ -3,7 +3,15 @@ control 'prometheus services' do title 'should be running' - describe service('prometheus-node-exporter') do + service = + case platform[:family] + when 'redhat' + 'node_exporter' + else + 'prometheus-node-exporter' + end + + describe service(service) do it { should be_enabled } it { should be_running } end diff --git a/test/salt/pillar/repo.sls b/test/salt/pillar/repo.sls index bd01c6d..284b5cc 100644 --- a/test/salt/pillar/repo.sls +++ b/test/salt/pillar/repo.sls @@ -80,18 +80,23 @@ prometheus: slack_configs: - channel: '#my-channel' image_url: 'http://some.img.com/img.png' + + {% if grains['os_family'] == 'Debian' %} service: name: prometheus-alertmanager + {% endif %} node_exporter: version: v0.18.1 archive: source_hash: b2503fd932f85f4e5baf161268854bf5d22001869b84f00fd2d1f57b51b72424 service: - name: prometheus-node-exporter args: web.listen-address: ":9110" # collector.textfile.directory: /var/tmp/node_exporter + {% if grains['os_family'] == 'Debian' %} + name: prometheus-node-exporter + {% endif %} prometheus: service: