Skip to content

Commit

Permalink
Add task to generate report reference
Browse files Browse the repository at this point in the history
    bundle exec rake references:report

It runs `puppet doc -r report` to generate references/report.md

The docs site does not use the generated markdown to render the webpage, but at
least this file will be accurate if new report processors are added in the future.
  • Loading branch information
joshcooper committed Aug 29, 2024
1 parent 09ca43d commit 1e01036
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rakelib/generate_references.rake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CONFIGURATION_ERB = File.join(__dir__, 'references/configuration.erb')
CONFIGURATION_MD = File.join(OUTPUT_DIR, 'configuration.md')
METAPARAMETER_ERB = File.join(__dir__, 'references/metaparameter.erb')
METAPARAMETER_MD = File.join(OUTPUT_DIR, 'metaparameter.md')
REPORT_ERB = File.join(__dir__, 'references/report.erb')
REPORT_MD = File.join(OUTPUT_DIR, 'report.md')

def render_erb(erb_file, variables)
# Create a binding so only the variables we specify will be visible
Expand Down Expand Up @@ -48,4 +50,10 @@ namespace :references do
body = puppet_doc('metaparameter')
generate_reference('metaparameter', METAPARAMETER_ERB, body, METAPARAMETER_MD)
end

desc "Generate report reference"
task :report do
body = puppet_doc('report')
generate_reference('report', REPORT_ERB, body, REPORT_MD)
end
end
13 changes: 13 additions & 0 deletions rakelib/references/report.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
layout: default
built_from_commit: <%= sha %>
title: Report Reference
toc: columns
canonical: "/puppet/latest/report.html"
---

# Report Reference

> **NOTE:** This page was generated from the Puppet source code on <%= now %>
<%= body %>
50 changes: 50 additions & 0 deletions references/report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
layout: default
built_from_commit: 41ffe0f49158b8f34714b7e18429afa0ce8ded09
title: Report Reference
toc: columns
canonical: "/puppet/latest/report.html"
---

# Report Reference

> **NOTE:** This page was generated from the Puppet source code on 2024-08-29 09:52:52 -0700



Puppet can generate a report after applying a catalog. This report includes
events, log messages, resource statuses, and metrics and metadata about the run.
Puppet agent sends its report to a Puppet master server, and Puppet apply
processes its own reports.

Puppet master and Puppet apply will handle every report with a set of report
processors, configurable with the `reports` setting in puppet.conf. This page
documents the built-in report processors.

See [About Reporting](https://puppet.com/docs/puppet/latest/reporting_about.html)
for more details.

http
----
Send reports via HTTP or HTTPS. This report processor submits reports as
POST requests to the address in the `reporturl` setting. When a HTTPS URL
is used, the remote server must present a certificate issued by the Puppet
CA or the connection will fail validation. The body of each POST request
is the YAML dump of a Puppet::Transaction::Report object, and the
Content-Type is set as `application/x-yaml`.

log
---
Send all received logs to the local log destinations. Usually
the log destination is syslog.

store
-----
Store the yaml report on disk. Each host sends its report as a YAML dump
and this just stores the file on disk, in the `reportdir` directory.

These files collect quickly -- one every half hour -- so it is a good idea
to perform some maintenance on them if you use this report (it's the only
default report).

0 comments on commit 1e01036

Please sign in to comment.