syslog_reports
Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 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
Add this module to your Puppetfile:
mod 'benjaminrobertson-syslog_reports', '0.1.0'
Learn more about managing modules with a PuppetfileDocumentation
syslog_reports
A Puppet report processor to send Puppet reports via native syslog. Includes Puppet manifest to configure syslog report processor.
Table of Contents
- Description
- Setup - The basics of getting started with syslog_reports
- Usage
- Limitations - OS compatibility, etc.
- 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.
- Include module within Puppetfile. Ensure code has deployed to all PE infrastructure servers.
- Under "PE Infrastructure Agent" node group. Add the
syslog_reports
class. - Set the following parameters
- enabled = true
- report_status = desired value.
- syslog_server = target syslog server.
- Ensure Puppet has completed a run on each PE infrastructure host.
- Puppet reports will now be sent to the syslog server.
Opensource Puppet
- Include module within Puppetfile. Ensure module is deployed to all OSP servers.
- 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
- For example
- Restart Puppet server
- Install the gem
- 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 :)
Reference
Table of Contents
Classes
syslog_reports
: Sets up native syslog report processor for Puppet Master, compilers and replica.
Classes
syslog_reports
Sets up native syslog report processor for Puppet Master, compilers and replica.
Parameters
The following parameters are available in the syslog_reports
class:
syslog_server
Data type: Stdlib::Host
FQDN or IP address of target syslog server.
enabled
Data type: Boolean
Enable the report processor.
Default value: false
manage_remote_syslog_logger_gem
Data type: Boolean
Install the remote_syslog_logger gem.
Default value: true
report_status
Data type: Enum['failed','changed','unchanged']
Level of reports to send to syslog. See readme.
Default value: 'changed'
Dependencies
- puppetlabs/stdlib (>= 6.0.0 < 10.0.0)
- puppetlabs/inifile (>= 5.0.0 < 7.0.0)