Forge Home

syslog_reports

A Puppet report processor to send Puppet reports via native syslog.

57 downloads

57 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Jul 25th 2024
This version is compatible with:
  • Puppet Enterprise 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'benjaminrobertson-syslog_reports', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add benjaminrobertson-syslog_reports
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install benjaminrobertson-syslog_reports --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

benjaminrobertson/syslog_reports — version 0.1.0 Jul 25th 2024

syslog_reports

A Puppet report processor to send Puppet reports via native syslog. Includes Puppet manifest to configure syslog report processor.

Table of Contents

  1. Description
  2. Setup - The basics of getting started with syslog_reports
  3. Usage
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

Syslog_reports includes a report processor which sends UDP syslog on port 514 to a specified syslog server.

Syslog messages are broken into the following Puppet report fields.

"[#{msg.time}]: #{hostname}: Level:#{msg.level} #{msg.source}: #{msg.message}"

See Puppet::Util::log documentation for information on Puppet report fields.

Setup

Setup Requirements

Puppet report processors need to be configured on the master, replica and all compilers to capture all agent reports.

Beginning with syslog_reports

Syslog_reports has three reporting levels which are set via the 'report_status' parameter/option.

  • failed: Only log Puppet reports which contain failures.
  • changed: Only log Puppet reports which contain failures AND changes.
  • unchanged: Log all Puppet reports.

If unset, syslog_reports will default to 'changed'.

Usage

Puppet Enterprise

To setup syslog_report processor in Puppet Enterprise using the provided manifest, perform the following steps.

  1. Include module within Puppetfile. Ensure code has deployed to all PE infrastructure servers.
  2. Under "PE Infrastructure Agent" node group. Add the syslog_reports class.
  3. Set the following parameters
    • enabled = true
    • report_status = desired value.
    • syslog_server = target syslog server.
  4. Ensure Puppet has completed a run on each PE infrastructure host.
  5. Puppet reports will now be sent to the syslog server.

Opensource Puppet

  1. Include module within Puppetfile. Ensure module is deployed to all OSP servers.
  2. On each Puppet server perform the following.
    • Install the gem remote_syslog_logger.
    • Under Puppet config directory (typically /etc/puppetlabs/puppet). Create a configuration file syslog_reports.yaml. Configure as required. Example below
    • Update puppet.conf to include syslog_reports. Under [master] section. Add syslog_reports to reports option. Use comma to separate entries.
      • For example reports = puppetdb,syslog_reports
    • Restart Puppet server
  3. Puppet reports will now be sent to the syslog server.

syslog_reports.yaml configuration file example

---
enabled: true
report_status: 'changed'
syslog_server: 'syslog.mycompany.example'

Limitations

  • Presently only UDP syslog on port 514 is supported. If you require TCP let me know via a feature request issue on Github.
  • All log line are truncated to maximum of 1024 characters. This restriction comes from RFC 3164 section 4.1.

Development

If you find any issues with this module, please log them in the issues register of the GitHub project. Issues

Module was developed with PDK.

PR's glady accepted :)