2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '1.9.2'
modulesync_config_version: '1.9.4'
15 changes: 6 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ sudo: false
dist: trusty
language: ruby
cache: bundler
# related to https://github.com/rubygems/rubygems/issues/2123
before_install:
- 'rm -f Gemfile.lock'
- 'gem update --system'
- 'gem install bundler'
- rm -f Gemfile.lock
script:
- 'bundle exec rake $CHECK'
matrix:
Expand All @@ -31,31 +28,31 @@ matrix:
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_setfile=ubuntu1404-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1404-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_setfile=ubuntu1604-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=ubuntu1604-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_setfile=debian8-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian8-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=debian9-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
- rvm: 2.5.1
bundler_args: --without development release
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} CHECK=beaker
env: PUPPET_INSTALL_TYPE=agent BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} CHECK=beaker
services: docker
sudo: required
branches:
Expand Down
23 changes: 21 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ 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.

## [v6.1.0](https://github.com/voxpupuli/puppet-prometheus/tree/v6.1.0) (2018-07-29)

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

**Implemented enhancements:**

- use web.external-url configuration [\#233](https://github.com/voxpupuli/puppet-prometheus/pull/233) ([tuxmea](https://github.com/tuxmea))

**Fixed bugs:**

- Debian init script for prometheus daemon doesn't implement 'reload' [\#240](https://github.com/voxpupuli/puppet-prometheus/issues/240)

**Closed issues:**

- web.external-url [\#232](https://github.com/voxpupuli/puppet-prometheus/issues/232)

**Merged pull requests:**

- revert eff8dad2 - dont update bundler during travis runs [\#239](https://github.com/voxpupuli/puppet-prometheus/pull/239) ([bastelfreak](https://github.com/bastelfreak))

## [v6.0.6](https://github.com/voxpupuli/puppet-prometheus/tree/v6.0.6) (2018-07-04)

[Full Changelog](https://github.com/voxpupuli/puppet-prometheus/compare/v6.0.5...v6.0.6)
Expand Down Expand Up @@ -190,7 +210,6 @@ These should not affect the functionality of the module.
**Fixed bugs:**

- not up to date dependencies: puppetlabs-stdlib should be \>= 4.13.0 [\#123](https://github.com/voxpupuli/puppet-prometheus/issues/123)
- prometheus.yaml broken syntax when generated from hiera [\#108](https://github.com/voxpupuli/puppet-prometheus/issues/108)
- prometheus systemd wants and depends "multi-user.target" [\#139](https://github.com/voxpupuli/puppet-prometheus/pull/139) ([bastelfreak](https://github.com/bastelfreak))
- daemon: explicitly pass provider to service [\#133](https://github.com/voxpupuli/puppet-prometheus/pull/133) ([costela](https://github.com/costela))

Expand Down Expand Up @@ -403,4 +422,4 @@ These should not affect the functionality of the module.



\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'puppetlabs_spec_helper', '~> 2.6.0', :require => false
gem 'puppetlabs_spec_helper', '~> 2.6', :require => false
gem 'rspec-puppet', '~> 2.5', :require => false
gem 'rspec-puppet-facts', :require => false
gem 'rspec-puppet-utils', :require => false
Expand Down Expand Up @@ -55,13 +55,16 @@ group :system_tests do
gem 'beaker-hostgenerator', '>= 1.1.10', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-module_install_helper', :require => false
gem 'rbnacl', '~> 4', :require => false if RUBY_VERSION >= '2.2.6'
gem 'rbnacl-libsodium', :require => false if RUBY_VERSION >= '2.2.6'
gem 'bcrypt_pbkdf', :require => false
end

group :release do
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/skywinder/github-changelog-generator' if RUBY_VERSION >= '2.2.2'
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem'
gem 'puppet-strings', '~> 1.0', :require => false
gem 'puppet-strings', '>= 1.0', :require => false
end


Expand Down
1 change: 1 addition & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"--storage.tsdb.retention=${prometheus::server::storage_retention}",
"--web.console.templates=${prometheus::server::shared_dir}/consoles",
"--web.console.libraries=${prometheus::server::shared_dir}/console_libraries",
"--web.external-url='${prometheus::server::external_url}'",
]
}

Expand Down
6 changes: 6 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@
# prometheus 1.8.*, only durations understood by golang's time.ParseDuration are supported. Starting
# with prometheus 2, durations can also be given in days, weeks and years.
#
# [*external_url*]
# The URL under which Alertmanager is externally reachable (for example, if Alertmanager is served
# via a reverse proxy). Used for generating relative and absolute links back to Alertmanager itself.
# If omitted, relevant URL components will be derived automatically.
#
# Actions:
#
# Requires: see Modulefile
Expand Down Expand Up @@ -174,6 +179,7 @@
Hash $config_hash = {},
Hash $config_defaults = {},
String $os = downcase($facts['kernel']),
Variant[Stdlib::HTTPUrl, Stdlib::Unixpath, String[0]] $external_url = '',
) {

case $arch {
Expand Down
1 change: 1 addition & 0 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
Boolean $manage_group = $prometheus::manage_group,
Boolean $purge_config_dir = $prometheus::purge_config_dir,
Boolean $manage_user = $prometheus::manage_user,
Variant[Stdlib::HTTPurl, Stdlib::Unixpath, String[0]] $external_url = $prometheus::external_url,
) inherits prometheus {

if( versioncmp($version, '1.0.0') == -1 ){
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-prometheus",
"version": "6.0.6",
"version": "6.1.0",
"author": "Vox Pupuli",
"summary": "This module installs, configures and manages the Prometheus service.",
"license": "Apache-2.0",
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/files/prometheus2.debian
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ DAEMON_ARGS="--config.file=/etc/prometheus/prometheus.yaml
--storage.tsdb.retention=360h
--web.console.templates=/usr/local/share/prometheus/consoles
--web.console.libraries=/usr/local/share/prometheus/console_libraries
--web.external-url=''
"
USER=prometheus
SCRIPTNAME=/etc/init.d/$NAME
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/files/prometheus2.systemd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ExecStart=/usr/local/bin/prometheus \
--storage.tsdb.retention=360h \
--web.console.templates=/usr/local/share/prometheus/consoles \
--web.console.libraries=/usr/local/share/prometheus/console_libraries \
--web.external-url='' \

ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/files/prometheus2.sysv
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ start() {
--storage.tsdb.retention=360h \
--web.console.templates=/usr/local/share/prometheus/consoles \
--web.console.libraries=/usr/local/share/prometheus/console_libraries \
--web.external-url='' \
>> "$LOG_FILE" &
retcode=$?
mkpidfile
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/files/prometheus2.upstart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ script
--storage.tsdb.retention=360h \
--web.console.templates=/usr/local/share/prometheus/consoles \
--web.console.libraries=/usr/local/share/prometheus/console_libraries \
--web.external-url='' \

end script

Expand Down
2 changes: 1 addition & 1 deletion templates/prometheus.debian.erb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ case "$1" in
#do_reload
#log_end_msg $?
#;;
restart|force-reload)
restart|reload|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
Expand Down