Showing with 2,545 additions and 1,075 deletions.
  1. +2 −1 .editorconfig
  2. +2 −1 .fixtures.yml
  3. +2 −32 .github/CONTRIBUTING.md
  4. +14 −10 .github/workflows/ci.yml
  5. +5 −0 .github/workflows/release.yml
  6. +3 −0 .gitignore
  7. +4 −1 .msync.yml
  8. +2 −1 .overcommit.yml
  9. +3 −0 .pmtignore
  10. +3 −0 .rspec
  11. +3 −0 .rspec_parallel
  12. +3 −0 .rubocop.yml
  13. +3 −0 .yardopts
  14. +31 −1 CHANGELOG.md
  15. +4 −1 Dockerfile
  16. +9 −6 Gemfile
  17. +3 −1 README.md
  18. +1,827 −912 REFERENCE.md
  19. +3 −0 Rakefile
  20. +3 −9 data/defaults.yaml
  21. +7 −0 manifests/alertmanager.pp
  22. +1 −1 manifests/bind_exporter.pp
  23. +21 −0 manifests/config.pp
  24. +4 −1 manifests/init.pp
  25. +52 −38 manifests/ipmi_exporter.pp
  26. +1 −1 manifests/process_exporter.pp
  27. +1 −0 manifests/server.pp
  28. +138 −0 manifests/ssh_exporter.pp
  29. +149 −0 manifests/ssl_exporter.pp
  30. +2 −2 metadata.json
  31. +19 −0 spec/acceptance/ipmi_exporter_spec.rb
  32. +0 −26 spec/acceptance/prometheus_server_spec.rb
  33. +17 −0 spec/acceptance/ssh_exporter_spec.rb
  34. +17 −0 spec/acceptance/ssl_exporter_spec.rb
  35. +26 −0 spec/classes/alertmanager_spec.rb
  36. +1 −1 spec/classes/beanstalkd_exporter_spec.rb
  37. +22 −17 spec/classes/ipmi_exporter_spec.rb
  38. +4 −0 spec/classes/node_exporter_spec.rb
  39. +1 −2 spec/classes/openldap_exporter_spec.rb
  40. +1 −1 spec/classes/openvpn_exporter_spec.rb
  41. +16 −0 spec/classes/server_spec.rb
  42. +45 −0 spec/classes/ssh_exporter_spec.rb
  43. +45 −0 spec/classes/ssl_exporter_spec.rb
  44. +1 −0 spec/default_module_facts.yml
  45. +2 −3 spec/spec_helper.rb
  46. +3 −1 spec/spec_helper_acceptance.rb
  47. +1 −3 spec/spec_helper_methods.rb
  48. +3 −1 spec/type_aliases/uri_spec.rb
  49. +5 −0 templates/alertmanager.yaml.erb
  50. +3 −0 templates/ipmi_exporter.yaml.epp
  51. +1 −1 templates/prometheus.yaml.erb
  52. +3 −0 templates/ssh_exporter.yaml.epp
  53. +3 −0 templates/ssl_exporter.yaml.epp
  54. +1 −0 types/uri.pp
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# editorconfig.org

# MANAGED BY MODULESYNC
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

root = true

Expand Down
3 changes: 2 additions & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ fixtures:
repositories:
archive: "https://github.com/voxpupuli/puppet-archive"
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib"
systemd: "https://github.com/camptocamp/puppet-systemd"
systemd: "https://github.com/voxpupuli/puppet-systemd"
sudo: "https://github.com/saz/puppet-sudo"
34 changes: 2 additions & 32 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,33 +232,7 @@ simple tests against it after applying the module. You can run this
with:

```sh
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 beaker
```

There are default rake tasks for the various acceptance test modules, e.g.,

```sh
bundle exec rake beaker:centos-7-x64
bundle exec rake beaker:ssh:centos-7-x64
```

If you don't want to have to recreate the virtual machine every time you can
use `BEAKER_destroy=no` and `BEAKER_provision=no`. On the first run you will at
least need `BEAKER_provision` set to yes (the default). The Vagrantfile for the
created virtual machines will be in `.vagrant/beaker_vagrant_files`.

Beaker also supports docker containers. We also use that in our automated CI
pipeline at [travis-ci](http://travis-ci.org). To use that instead of Vagrant:

```sh
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian10-64{hypervisor=docker} BEAKER_destroy=yes bundle exec rake beaker
BEAKER_setfile=debian10-x64 bundle exec rake beaker
```

You can replace the string `debian10` with any common operating system.
Expand All @@ -272,11 +246,7 @@ The following strings are known to work:
* centos7
* centos8

The easiest way to debug in a docker container is to open a shell:

```sh
docker exec -it -u root ${container_id_or_name} bash
```
For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).

The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb)
repository.
24 changes: 14 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: CI

on: pull_request
Expand All @@ -6,28 +10,32 @@ jobs:
setup_matrix:
name: 'Setup Test Matrix'
runs-on: ubuntu-latest
timeout-minutes: 40
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
BUNDLE_WITHOUT: development:release
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
ruby-version: '3.0'
bundler-cache: true
- name: Run rake validate
run: bundle exec rake validate
- name: Run static validations
run: bundle exec rake validate lint check
- name: Run rake rubocop
run: bundle exec rake rubocop
- name: Setup Test Matrix
id: get-outputs
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false

unit:
needs: setup_matrix
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
Expand All @@ -44,7 +52,7 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
run: bundle exec rake parallel_spec

acceptance:
needs: setup_matrix
Expand All @@ -58,15 +66,11 @@ jobs:
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'
ruby-version: '3.0'
bundler-cache: true
- name: Run tests
run: bundle exec rake beaker
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: Release

on:
Expand All @@ -12,6 +16,7 @@ jobs:
deploy:
name: 'deploy to forge'
runs-on: ubuntu-latest
if: github.repository_owner == 'voxpupuli'
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

pkg/
Gemfile.lock
Gemfile.local
Expand Down
5 changes: 4 additions & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
---
modulesync_config_version: '4.0.0'
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '4.1.0'
3 changes: 2 additions & 1 deletion .overcommit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Managed by https://github.com/voxpupuli/modulesync_configs
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/
#
# Hooks are only enabled if you take action.
#
Expand Down
3 changes: 3 additions & 0 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

docs/
pkg/
Gemfile
Expand Down
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--format documentation
--color
3 changes: 3 additions & 0 deletions .rspec_parallel
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--format progress
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

inherit_gem:
voxpupuli-test: rubocop.yml
3 changes: 3 additions & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

--markup markdown
--output-dir docs/
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,37 @@ 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.2.0](https://github.com/voxpupuli/puppet-prometheus/tree/v11.2.0) (2021-06-08)
## [v12.0.0](https://github.com/voxpupuli/puppet-prometheus/tree/v12.0.0) (2021-07-26)

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

**Breaking changes:**

- Overhaul and fix ipmi\_exporter class [\#562](https://github.com/voxpupuli/puppet-prometheus/pull/562) ([treydock](https://github.com/treydock))

**Implemented enhancements:**

- Support SSL exporter [\#567](https://github.com/voxpupuli/puppet-prometheus/pull/567) ([treydock](https://github.com/treydock))
- Add support for SSH exporter [\#566](https://github.com/voxpupuli/puppet-prometheus/pull/566) ([treydock](https://github.com/treydock))
- Support mute\_time\_intervals for Alertmanager [\#563](https://github.com/voxpupuli/puppet-prometheus/pull/563) ([treydock](https://github.com/treydock))
- Support Stdlib::Filesource as type for download urls [\#561](https://github.com/voxpupuli/puppet-prometheus/pull/561) ([gburton1](https://github.com/gburton1))

**Fixed bugs:**

- Fix wrong undef datatypes [\#570](https://github.com/voxpupuli/puppet-prometheus/pull/570) ([bastelfreak](https://github.com/bastelfreak))

**Closed issues:**

- Alertmanger service will not start \(public IP\) [\#558](https://github.com/voxpupuli/puppet-prometheus/issues/558)

**Merged pull requests:**

- switch from camptocamp/systemd to voxpupuli/systemd [\#569](https://github.com/voxpupuli/puppet-prometheus/pull/569) ([bastelfreak](https://github.com/bastelfreak))
- Fix IPMI exporter sudo config, add dependency on saz/sudo [\#565](https://github.com/voxpupuli/puppet-prometheus/pull/565) ([treydock](https://github.com/treydock))
- Misc fixes to make IPMI exporter more consistent [\#564](https://github.com/voxpupuli/puppet-prometheus/pull/564) ([treydock](https://github.com/treydock))
- Allow default scrape\_configs to be optional [\#542](https://github.com/voxpupuli/puppet-prometheus/pull/542) ([treydock](https://github.com/treydock))

## [v11.2.0](https://github.com/voxpupuli/puppet-prometheus/tree/v11.2.0) (2021-06-09)

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

Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM ruby:2.5.3
# MANAGED BY MODULESYNC
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

FROM ruby:2.7

WORKDIR /opt/puppet

Expand Down
15 changes: 9 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

source ENV['GEM_SOURCE'] || "https://rubygems.org"

group :test do
Expand All @@ -17,17 +20,17 @@ group :system_tests do
end

group :release do
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/voxpupuli/github-changelog-generator', :branch => 'voxpupuli_essential_fixes'
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
gem 'github_changelog_generator', '>= 1.16.1', :require => false
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
end

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

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

# vim: syntax=ruby
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ This module supports below Prometheus architectures:
- i386
- armv71 (Tested on raspberry pi 3)

The `prometheus::ipmi_exporter` class has a dependency on [saz/sudo](https://forge.puppet.com/modules/saz/sudo) Puppet module.

## Background

This module automates the install and configuration of Prometheus monitoring tool: [Prometheus web site](https://prometheus.io/docs/introduction/overview/)
Expand All @@ -45,7 +47,7 @@ This module automates the install and configuration of Prometheus monitoring too
* Installs a configuration file for prometheus daemon (/etc/prometheus/prometheus.yaml) or for alertmanager (/etc/prometheus/alert.rules)
* Manages the services via upstart, sysv, or systemd
* Optionally creates alert rules
* The following exporters are currently implemented: node_exporter, statsd_exporter, process_exporter, haproxy_exporter, mysqld_exporter, blackbox_exporter, consul_exporter, redis_exporter, varnish_exporter, graphite_exporter, postgres_exporter, collectd_exporter, grok_exporter, ipsec_exporter, openldap_exporter, openvpn_exporter
* The following exporters are currently implemented: node_exporter, statsd_exporter, process_exporter, haproxy_exporter, mysqld_exporter, blackbox_exporter, consul_exporter, redis_exporter, varnish_exporter, graphite_exporter, postgres_exporter, collectd_exporter, grok_exporter, ipsec_exporter, openldap_exporter, openvpn_exporter, ssh_exporter, ssl_exporter

## Usage

Expand Down
Loading