Skip to content

Commit

Permalink
deprecation of source_match(_re) and target_match(_re)
Browse files Browse the repository at this point in the history
these settings have been deprecated since 2021

test is done by calling amtool in https://github.com/voxpupuli/puppet-prometheus/blob/master/spec/classes/alertmanager_spec.rb#L172

fixes #697
  • Loading branch information
TheMeier committed May 11, 2024
1 parent 5dc551e commit f6f0e72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions data/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ prometheus::alertmanager::global:
'smtp_from': 'alertmanager@localhost'
prometheus::alertmanager::group: 'alertmanager'
prometheus::alertmanager::inhibit_rules:
- 'source_match':
'severity': 'critical'
'target_match':
'severity': 'warning'
- 'source_matchers':
- 'severity = critical'
'target_matchers':
- 'severity = warning'
'equal':
- 'alertname'
- 'cluster'
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/alertmanager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
it 'alertmanager works idempotently with no errors' do

Check failure on line 6 in spec/acceptance/alertmanager_spec.rb

View workflow job for this annotation

GitHub Actions / Distro Puppet - Archlinux rolling

prometheus alertmanager alertmanager works idempotently with no errors Failure/Error: apply_manifest(pp, catch_changes: true) Beaker::Host::CommandFailure: Host 'archlinuxrolling-64.example.com' exited with 2 running: puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest_130402537.pp.sJ2L9M Last 10 lines of output were: Info: Loading facts Info: Loading facts Info: Loading facts �[mNotice: Compiled catalog for archlinuxrolling-64.example.com in environment production in 0.16 seconds Info: Using environment 'production' Info: Applying configuration version '1715432644' �[mNotice: /Stage[main]/Prometheus::Alertmanager/File[/etc/alertmanager/alertmanager.yml]/ensure: removed �[mNotice: /Stage[main]/Prometheus::Alertmanager/File[/etc/alertmanager/template]: Not removing directory; use 'force' to override �[mNotice: /Stage[main]/Prometheus::Alertmanager/File[/etc/alertmanager/template]/ensure: removed �[mNotice: Applied catalog in 0.59 seconds
pp = <<-EOS
class { 'prometheus::alertmanager':
version => '0.17.0',
version => '0.27.0',
extra_options => '--web.listen-address=":9093"',
route => { 'receiver' => 'default' },
receivers => [
Expand Down

0 comments on commit f6f0e72

Please sign in to comment.