Git Product home page Git Product logo

chef-papertrail's Introduction

Papertrail Cookbook

This cookbook configures the Papertrail remote_syslog2 agent. To configure rsyslog for use with Papertrail, check out the Papertrail documentation.

Supported Platforms

  • RHEL 6 / CentOS 6
  • RHEL 7 / CentOS 7
  • Amazon Linux 2017.03
  • Ubuntu 14.04
  • Ubuntu 16.04
  • Debian 9

This cookbook has been tested on Chef 13.x and 12.21.x.

Usage

Quickstart

  1. Set the attributes node['papertrail']['destination_host'], node['papertrail']['destination_port'], and at least one file/directory in node['papertrail']['files'].
  2. Include papertrail in your node's run_list:
{
  "run_list": [
    "recipe[papertrail]"
  ]
}

This will install remote_syslog2 with the configured settings from the Chef node attributes.

Recipes & their attributes

This cookbook only has one recipe, which does all setup and configuration. There are a number of attributes you can configure, all of which mirror the configuration items found in the remote_syslog2 README.

  • node['papertrail']['files']

    Type: Array

    A list of files or patterns to send to Papertrail. At least one entry is required.

    Example:

      node['papertrail']['files'] = [
        '/tmp/test.log',
        '/srv/foo.txt',
        '/var/log/*.bar'
      ]

    To tag a file/path, the structure is slightly different:

      node['papertrail']['files'] = [
        '/tmp/test.log',
        '/srv/foo.txt',
        {'path' => '/srv/foo.txt', 'tag' => 'my_tag'}
      ]
  • node['papertrail']['exclude_files']

    Type: Array

    A list of files or patterns to exclude.

    Example:

      node['papertrail']['exclude_files'] = [
        '/tmp/exlude.log',
        '/srv/dont-include.log',
        '/var/log/skip-me.log'
      ]
  • node['papertrail']['exclude_patterns']

    Type: Array

    A regex of log message patterns to exclude.

    Example:

      node['papertrail']['exclude_patterns'] = ['\d+ things']
  • node['papertrail']['hostname']

    Type: String

    Override the default hostname.

    Example:

      node['papertrail']['hostname'] = 'my-super-awesome-hostname'
  • node['papertrail']['destination_host'], node['papertrail']['destination_port'], & node['papertrail']['destination_protocol']

    Type: String (destination_host & destination_protocol) Type: Integer (destination_port)

    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:

      node['papertrail']['destination_host'] = 'logsN.papertrailapp.com'
      node['papertrail']['destination_port'] = XXXXX
      node['papertrail']['destination_protocol'] = 'tls'
  • node['papertrail']['new_file_check_interval']

    Type: Integer

    Overrides the default file check interval.

    Example:

      node['papertrail']['new_file_check_interval'] = 30
  • node['papertrail']['severity']

    Overrides the default remote_syslog2 severity level.

    Example:

      node['papertrail']['severity'] = 'warn'
  • node['papertrail']['facility']

    Overrides the default remote_syslog2 facility.

    Example:

      node['papertrail']['facility'] = 'local7'
  • node['papertrail']['version']

    Type: String

    Use a different version of remote_syslog than the default.

    Example:

      node['papertrail']['version'] = '0.18'

Testing

See TESTING.md

Contributing

See CONTRIBUTING.md

License and Authors

License: See LICENSE

Author: Mike Julian (@mjulian)

chef-papertrail's People

Contributors

mjulian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.