diff --git a/files/report.rb b/files/report.rb index 3f421ab..c998a0b 100644 --- a/files/report.rb +++ b/files/report.rb @@ -146,8 +146,12 @@ def logs_to_array logs # skipping debug messages, we dont want them in Foreman's db next if log.level == :debug + # skipping Puppet 7/8 messages + next if log.message =~ /^Requesting catalog from .+$/ + next if log.message =~ /^Catalog compiled by .+$/ + # skipping catalog summary run messages, we dont want them in Foreman's db - next if log.message =~ /^Finished catalog run in \d+.\d+ seconds$/ + next if log.message =~ /^(Finished catalog run|Applied catalog) in \d+.\d+ seconds$/ # Match Foreman's slightly odd API format... h << { diff --git a/spec/static_fixtures/report-format-6.json b/spec/static_fixtures/report-format-6.json index b7d398a..dbfcc2c 100644 --- a/spec/static_fixtures/report-format-6.json +++ b/spec/static_fixtures/report-format-6.json @@ -210,17 +210,6 @@ }, "level": "notice" } - }, - { - "log": { - "sources": { - "source": "//slave01.rackspace.theforeman.org/Puppet" - }, - "messages": { - "message": "Applied catalog in 14.26 seconds" - }, - "level": "notice" - } } ] } diff --git a/spec/static_fixtures/report-format-6.yaml b/spec/static_fixtures/report-format-6.yaml index d0a9ea2..0e47cd9 100644 --- a/spec/static_fixtures/report-format-6.yaml +++ b/spec/static_fixtures/report-format-6.yaml @@ -298,15 +298,6 @@ logs: time: '2017-06-28T17:28:27.282770457+00:00' file: "/etc/puppetlabs/code/environments/production/modules/ntp/manifests/service.pp" line: 6 -- !ruby/object:Puppet::Util::Log - level: :notice - message: Applied catalog in 14.26 seconds - source: "//slave01.rackspace.theforeman.org/Puppet" - tags: - - notice - time: '2017-06-28T17:28:31.534448086+00:00' - file: - line: catalog_uuid: e8c2c0aa-6648-4423-b4c1-a1b2b3d19653 environment: production configuration_version: 1498670892