Version information
This version is compatible with:
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'papertrail-papertrail', '1.1.2'
Learn more about managing modules with a PuppetfileDocumentation
papertrail
Table of Contents
- Description
- Setup - The basics of getting started with papertrail
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
This module configures the Papertrail remote_syslog2 agent. To configure rsyslog
for use with Papertrail, check out the Papertrail documentation.
Setup
What papertrail
affects
This module installs and manages the Papertrail remote_syslog2
agent via the Github releases.
Beginning with papertrail
Set the parameters $papertrail::destination_host
, $papertrail::destination_port
, and at least one file/directory in $papertrail::files
.
class {'papertrail':
destination_host => 'logsN.papertrailapp.com',
destination_port => XXXXX,
files => ['/tmp/test.log', '/srv/foo.txt', '/var/log/*.bar']
}
Usage
This module only has one manifest, which does all setup and configuration. There are a number of parameters you can configure, all of which mirror the configuration items found in the remote_syslog2
README.
-
$papertrail::files
Type: Array
A list of files or patterns to send to Papertrail. At least one entry is required.
Example:
class {'papertrail': files => [ '/tmp/test.log', '/srv/foo.txt', '/var/log/*.bar' ] }
To tag a file/path, the structure is slightly different:
class {'papertrail': files => [ '/tmp/test.log', '/srv/foo.txt', '/var/log/*.bar', {'path' => '/srv/foo.txt', 'tag' => 'my_tag'} ] }
-
$papertrail::exclude_files
Type: Array
A list of files or patterns to exclude.
Example:
class {'papertrail': exclude_files => [ '/tmp/exlude.log', '/srv/dont-include.log', '/var/log/skip-me.log' ] }
-
$papertrail::exclude_patterns
Type: Array
A regex of log message patterns to exclude.
Example:
class {'papertrail': exclude_patterns => ['\d+ things'] }
-
$papertrail::hostname
Type: String
Override the default hostname.
Example:
class {'papertrail': hostname => 'my-super-awesome-hostname' }
-
$papertrail::destination_host
,$papertrail::destination_port
, &$papertrail::destination_protocol
Type: String (except
$destination_port
, which is Integer)The Papertrail host and port to send logs to, and the protocol to use. These are required. Destination and port default to empty, while Protocol defaults to
tls
.Example:
class {'papertrail': destination_host => 'logsN.papertrailapp.com', destination_port => XXXXX, destination_protocol => 'tls' }
-
$papertrail::new_file_check_interval
Type: Integer
Overrides the default file check interval.
Example:
class {'papertrail': new_file_check_interval => 30 }
-
$papertrail::severity
Type: String
Overrides the default
remote_syslog2
severity level.Example:
class {'papertrail': severity => 'warn' }
-
$papertrail::facility
Type: String
Overrides the default
remote_syslog2
facility.Example:
class {'papertrail': facility => 'local7' }
-
$papertrail::version
Type: String
Use a different version of
remote_syslog
than the default.Example:
class {'papertrail': version => '0.18' }
Limitations
Supported Platforms
- RHEL 6 / CentOS 6
- RHEL 7 / CentOS 7
- Amazon Linux 2017.03
- Ubuntu 14.04
- Ubuntu 16.04
- Debian 9
Supported Puppet Versions
This module has been tested on Puppet 4.x and 5.x.
Development
Testing
Integration tests utilize kitchen-puppet
and serverspec
. To run the test suite:
- Run
bundle install
- Run
kitchen test
Style and syntax tests can be run with:
puppet-lint manifests/*
puppet parser validate manifests/*
No unit tests have been written at this time.
All contributions must pass the tests above.
spec/fixtures/manifests/site.pp
contains the configuration for testing.
Testing Amazon Linux
Testing Amazon Linux through test-kitchen
requires a bit more setup:
- Ensure
kitchen-ec2
is installed:gem install kitchen-ec2
- Update
.kitchen.yml
to have the correct AWS key ID you're going to use - Set
security_group_ids
in the driver section to include a security group accessible from your laptop. Not setting this will use thedefault
security group. - Set
transport.ssh_key
to the path of your SSH key. It looks forid_rsa
by default.
Release Notes/Contributors/Etc.
License: See LICENSE
Author: Mike Julian (@mjulian)
Dependencies
Copyright 2017 Papertrail, Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.