Showing with 379 additions and 792 deletions.
  1. +2 −3 .github/CONTRIBUTING.md
  2. +75 −0 .github/workflows/ci.yml
  3. +29 −0 .github/workflows/release.yml
  4. +1 −1 .msync.yml
  5. +15 −2 .pmtignore
  6. +0 −1 .sync.yml
  7. +0 −105 .travis.yml
  8. +35 −0 CHANGELOG.md
  9. +6 −21 Gemfile
  10. +37 −29 REFERENCE.md
  11. +8 −1 Rakefile
  12. +1 −2 lib/facter/alert_manager_running.rb
  13. +4 −4 manifests/alertmanager.pp
  14. +1 −1 manifests/apache_exporter.pp
  15. +1 −1 manifests/beanstalkd_exporter.pp
  16. +4 −0 manifests/bird_exporter.pp
  17. +1 −1 manifests/blackbox_exporter.pp
  18. +1 −1 manifests/collectd_exporter.pp
  19. +4 −8 manifests/config.pp
  20. +1 −1 manifests/consul_exporter.pp
  21. +4 −14 manifests/daemon.pp
  22. +1 −1 manifests/dellhw_exporter.pp
  23. +1 −1 manifests/elasticsearch_exporter.pp
  24. +1 −1 manifests/graphite_exporter.pp
  25. +1 −1 manifests/grok_exporter.pp
  26. +1 −1 manifests/haproxy_exporter.pp
  27. +1 −1 manifests/init.pp
  28. +1 −1 manifests/memcached_exporter.pp
  29. +1 −1 manifests/mesos_exporter.pp
  30. +1 −1 manifests/mongodb_exporter.pp
  31. +1 −1 manifests/mysqld_exporter.pp
  32. +1 −1 manifests/node_exporter.pp
  33. +1 −1 manifests/postgres_exporter.pp
  34. +1 −1 manifests/process_exporter.pp
  35. +2 −2 manifests/puppetdb_exporter.pp
  36. +1 −1 manifests/rabbitmq_exporter.pp
  37. +1 −1 manifests/redis_exporter.pp
  38. +4 −4 manifests/service_reload.pp
  39. +1 −1 manifests/snmp_exporter.pp
  40. +1 −1 manifests/statsd_exporter.pp
  41. +1 −1 manifests/varnish_exporter.pp
  42. +4 −7 metadata.json
  43. +0 −14 spec/acceptance/nodesets/archlinux-2-x64.yml
  44. +20 −0 spec/classes/apache_exporter_spec.rb
  45. +18 −3 spec/classes/bird_exporter_spec.rb
  46. +14 −8 spec/classes/node_exporter_spec.rb
  47. +3 −21 spec/classes/prometheus_spec.rb
  48. +5 −4 spec/classes/puppetdb_exporter_spec.rb
  49. +28 −30 spec/classes/server_spec.rb
  50. +22 −116 spec/defines/daemon_spec.rb
  51. +2 −2 spec/fixtures/files/prometheus1.sysv
  52. +2 −2 spec/fixtures/files/prometheus2.sysv
  53. +1 −24 spec/spec_helper_methods.rb
  54. +0 −162 templates/daemon.debian.erb
  55. +1 −0 templates/daemon.env.erb
  56. +2 −0 templates/daemon.systemd.erb
  57. +1 −1 templates/daemon.sysv.erb
  58. +0 −174 templates/prometheus.debian.erb
  59. +2 −2 templates/prometheus.sysv.erb
  60. +0 −2 types/initstyle.pp
5 changes: 2 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,14 @@ simple tests against it after applying the module. You can run this
with:

```sh
bundle exec rake acceptance
bundle exec rake beaker
```

This will run the tests on the module's default nodeset. You can override the
nodeset used, e.g.,

```sh
BEAKER_set=centos-7-x64 bundle exec rake acceptance
BEAKER_set=centos-7-x64 bundle exec rake beaker
```

There are default rake tasks for the various acceptance test modules, e.g.,
Expand Down Expand Up @@ -269,7 +269,6 @@ The following strings are known to work:
* ubuntu2004
* debian9
* debian10
* centos6
* centos7
* centos8

Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: CI

on: pull_request

jobs:
setup_matrix:
name: 'Setup Test Matrix'
runs-on: ubuntu-latest
outputs:
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }}
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }}
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
env:
BUNDLE_WITHOUT: development:test:release
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Run rake validate
run: bundle exec rake validate
- name: Setup Test Matrix
id: get-outputs
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false

unit:
needs: setup_matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}}
env:
BUNDLE_WITHOUT: development:system_tests:release
PUPPET_VERSION: "~> ${{ matrix.puppet }}.0"
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake

acceptance:
needs: setup_matrix
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: development:test:release
strategy:
fail-fast: false
matrix:
setfile: ${{fromJson(needs.setup_matrix.outputs.beaker_setfiles)}}
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
steps:
- name: Enable IPv6 on docker
run: |
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Run tests
run: bundle exec rake beaker
env:
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet.collection }}
BEAKER_setfile: ${{ matrix.setfile.value }}
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
push:
tags:
- '*'

env:
BUNDLE_WITHOUT: development:test:system_tests

jobs:
deploy:
name: 'deploy to forge'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
- name: Build and Deploy
env:
# Configure secrets here:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets
BLACKSMITH_FORGE_USERNAME: '${{ secrets.PUPPET_FORGE_USERNAME }}'
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
run: bundle exec rake module:push
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
modulesync_config_version: '3.0.0'
modulesync_config_version: '4.0.0'
17 changes: 15 additions & 2 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
docs/
pkg/
Gemfile
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/manifests/
spec/fixtures/modules/
spec/
Rakefile
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.github/
.librarian/
Puppetfile.lock
*.iml
.editorconfig
.fixtures.yml
.gitignore
.msync.yml
.overcommit.yml
.pmtignore
.rspec
.rspec_parallel
.rubocop.yml
.sync.yml
.*.sw?
.yardoc/
.yardopts
Dockerfile
1 change: 0 additions & 1 deletion .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
docker_sets:
- set: centos7-64
- set: centos8-64
- set: debian8-64
- set: debian9-64
- set: debian10-64
- set: ubuntu1604-64
Expand Down
105 changes: 0 additions & 105 deletions .travis.yml

This file was deleted.

35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@ 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.

## [v11.0.0](https://github.com/voxpupuli/puppet-prometheus/tree/v11.0.0) (2021-01-17)

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

**Breaking changes:**

- Drop Puppet 5; require at least Puppet 6.1.0 [\#518](https://github.com/voxpupuli/puppet-prometheus/pull/518) ([bastelfreak](https://github.com/bastelfreak))
- puppetdb\_exporter: Update 1.0.0-\>1.1.0 [\#513](https://github.com/voxpupuli/puppet-prometheus/pull/513) ([bastelfreak](https://github.com/bastelfreak))
- Drop EOL CentOS 6 support [\#512](https://github.com/voxpupuli/puppet-prometheus/pull/512) ([bastelfreak](https://github.com/bastelfreak))
- Drop Debian 8 support/compatibility [\#496](https://github.com/voxpupuli/puppet-prometheus/pull/496) ([bastelfreak](https://github.com/bastelfreak))

**Implemented enhancements:**

- Support Puppet 7.x [\#515](https://github.com/voxpupuli/puppet-prometheus/pull/515) ([bastelfreak](https://github.com/bastelfreak))
- Add Ubuntu 20.04 support [\#514](https://github.com/voxpupuli/puppet-prometheus/pull/514) ([bastelfreak](https://github.com/bastelfreak))
- Daemon: create env files only if required [\#493](https://github.com/voxpupuli/puppet-prometheus/pull/493) ([bastelfreak](https://github.com/bastelfreak))

**Fixed bugs:**

- Purge collected configs based on $purge\_config\_dir [\#517](https://github.com/voxpupuli/puppet-prometheus/pull/517) ([towo](https://github.com/towo))
- \(FACT-2880\) fact: call Puppet within setcode block [\#511](https://github.com/voxpupuli/puppet-prometheus/pull/511) ([bastelfreak](https://github.com/bastelfreak))
- Allow download\_extension to be empty string [\#507](https://github.com/voxpupuli/puppet-prometheus/pull/507) ([treydock](https://github.com/treydock))
- fix sysv init scripts [\#502](https://github.com/voxpupuli/puppet-prometheus/pull/502) ([kubicgruenfeld](https://github.com/kubicgruenfeld))

**Closed issues:**

- haproxy\_exporter fails scraping when haproxy.scrape-uri contains specials characters [\#516](https://github.com/voxpupuli/puppet-prometheus/issues/516)
- scrape\_job exported resources are ignoring custom collect dir [\#490](https://github.com/voxpupuli/puppet-prometheus/issues/490)
- config.pp does not honor $prometheus::purge\_config\_dir value [\#460](https://github.com/voxpupuli/puppet-prometheus/issues/460)
- SysV init script leaves dangling shell processes [\#293](https://github.com/voxpupuli/puppet-prometheus/issues/293)

**Merged pull requests:**

- Fix typo in init.pp docs [\#504](https://github.com/voxpupuli/puppet-prometheus/pull/504) ([genebean](https://github.com/genebean))

## [v10.2.0](https://github.com/voxpupuli/puppet-prometheus/tree/v10.2.0) (2020-09-26)

[Full Changelog](https://github.com/voxpupuli/puppet-prometheus/compare/v10.1.0...v10.2.0)
Expand Down
27 changes: 6 additions & 21 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"

def location_for(place, fake_version = nil)
if place =~ /^(git[:@][^#]*)#(.*)/
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
elsif place =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
else
[place, { :require => false }]
end
end

group :test do
gem 'voxpupuli-test', '~> 2.1', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
end

group :development do
gem 'travis', :require => false
gem 'travis-lint', :require => false
gem 'guard-rake', :require => false
gem 'overcommit', '>= 0.39.1', :require => false
end

group :system_tests do
gem 'voxpupuli-acceptance', :require => false
gem 'puppet_metadata', '~> 0.3.0', :require => false
gem 'voxpupuli-acceptance', :require => false
end

group :release do
Expand All @@ -34,15 +23,11 @@ group :release do
gem 'puppet-strings', '>= 2.2', :require => false
end

gem 'puppetlabs_spec_helper', '~> 2.0', :require => false
gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]


if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion.to_s, :require => false, :groups => [:test]
else
gem 'facter', :require => false, :groups => [:test]
end

ENV['PUPPET_VERSION'].nil? ? puppetversion = '~> 6.0' : puppetversion = ENV['PUPPET_VERSION'].to_s
puppetversion = ENV['PUPPET_VERSION'] || '~> 6.0'
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim: syntax=ruby
Loading