GithubHelp home page GithubHelp logo

puppet-logentries's Introduction

Logentries for Puppet

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup
  4. Usage
  5. Limitations
  6. Development

Overview

This is a Puppet module for easy installation and configuration of the logentries linux agent.

Module Description

This is the official module for working with Logentries in puppet.

With this module, you are currently able to

  • automatically add the logentries repos and GPG keys for
    • RHEL 7/CentOS7
    • Ubuntu 14.04 (trusty)
    • Debian 8 (Jessie)
    • other versions of those distributions may work but are currently not tested.
  • configure the logentries agent
  • follow logs via either local config or server side config, host based or via tokens

Why Logentries

Logentries is a real-time log management and analytics service that makes it easy to collect logs from any environment for search, monitoring and analysis.

Setup

What Logentries Does

By using this module, you will deploy and run an open source log collecting client daemon (agent) implemented in python.

Setup Requirements

For automatically managing package repos, this module requires

  • Debian/Ubuntu: apt with pluginsync=true
  • lsb_release

Install

Install this module by issuing puppet module install logentries or by downloading the latest version and unpacking it in your modules folder.

Usage

Configure the logentries class with your account key - if you include this this in any boilerplate class, you should make sure all platforms using it are supported.

The bare minimum configuration would include only the account key:

class {'logentries':
  # Get this key by executing le register manually on a test host
  # and extract it from /etc/le/config or by going to "account -> 
  # profile -> account key" in the web interface
  account_key => "nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn",
}

The module knows of a few more useful configuration parameters:

class {'logentries':
  account_key => "nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn",

  # Specify the host specific agent key - useful if 
  # you need to re-setup or for whatever other reason
  # want to re-use an already registered host
  agent_key => "nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn",
  
  # Specify an alternate datahub
  datahub => "datahub.myorganization.com",
  
  # Do not create local follow configurations, but use
  # server-side configuration.
  use_server_config => true,
  
  # If you prefer to provide the logentries and logentries-daemon
  # packages via other means (e.g. your own local repo) you can
  # prevent this module from automatically adding the external
  # logentries repos.
  manage_repos => false, 
}

Install the agent

# Automatically included by logentries::agent::follow directives
include logentries::agent

Follow a logfile

Stream the content of a logfile to logentries.

# NB: This is just an example. There are significantly better ways to 
# integrate logentries with syslog than this
logentries::agent::follow {"/var/log/messages": }

Add a logfile to a logset or destination

This would be useful if you want to combinine log sources from similar logfiles across many hosts into one log file.

# NB: This is just an example. There are significantly better ways to 
# integrate logentries with syslog than this
logentries::agent::follow {"all www server messages":
  path => "/var/log/messages",
 
  # Alternatively, specify your own destination. Only the destination
  # OR the token parameter can be used.
  destination = "www-servers/messages",

  # Create this token first in the web interface. Not
  # compatible with server-side configs.
  # token => "nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn",
}

Limitations

  1. Works on Debian, Ubuntu and RHEL/CentOS only.
  2. If /etc/le/config already exists, it won't be updated unless deleted first

Known Issues

  1. Adds the RPM key via URL
  2. After a class configuration change, /etc/le/config has to be manually deleted to trigger its recreation
  3. To remove follow configurations, local or server side config has to be manually deleted.
  4. No sensible syslog support
  5. No datahub class
  6. No filter support

puppet-logentries's People

Contributors

arobinson-r7 avatar gearoidof avatar gearoidof-r7 avatar simonirwin-r7 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-logentries's Issues

GPG key expired

$ wget https://rep.logentries.com/RPM-GPG-KEY-logentries -O RPM-GPG-KEY-logentries 
--2016-03-14 13:14:48-- https://rep.logentries.com/RPM-GPG-KEY-logentries 
Resolving rep.logentries.com (rep.logentries.com)... 130.193.12.76 
Connecting to rep.logentries.com (rep.logentries.com)|130.193.12.76|:443... connected. 
HTTP request sent, awaiting response... 200 OK 
Length: 1752 (1,7K) 
Saving to: ‘RPM-GPG-KEY-logentries’

RPM-GPG-KEY-logentries 100%[==========================================================================================================================================>] 1,71K --.-KB/s in 0s

2016-03-14 13:14:48 (165 MB/s) - ‘RPM-GPG-KEY-logentries’ saved [1752/1752]

$ gpg RPM-GPG-KEY-logentries 
pub 2048R/C43C79AD 2011-03-12 Logentries Release Key <[email protected]> 
sub 2048R/BEA45DAB 2011-03-12 [expires: 2016-03-10]

Although you can find a fix for Ubuntu/Debian using this:

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C43C79AD
apt-key export C43C79AD

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1

mQENBE16w8YBCAC0U7hdeaZ99rZtTa81Au8bQPbDh016FvLSRom8gvUSLiAzPtAE
F+xQE04hALWIMGUBaYdq0HVPa05k0shf5aOCJabmQaBNJdKtSC5Uj3VTA00NHTIs
5ZIjrIngSzNvgPVBcAfNwQuPLHbQl2O1b7T6jR6p+W5a0tBuWnM+4/k+JelUc4t1
dSehytant2SovIwtRLFY+hsnkrEVr4Rqbg3mwzc8itJJulGlR9+I7025KWIDzZfi
kGjbCkbXmToewWa2smSzGLMr0s1y+AV36WO/qIFTeDEWhwmKTopXXCi3WrRIlXJz
yQJ0e4Umt5WUxoUrw30xP/O2eH+V+YjU5lSzABEBAAG0LExvZ2VudHJpZXMgUmVs
ZWFzZSBLZXkgPGluZm9AbG9nZW50cmllcy5jb20+iQE4BBMBAgAiAhsDBgsJCAcD
AgYVCAIJCgsEFgIDAQIeAQIXgAUCVuFl+AAKCRClJwKJxDx5rbHaCACHMuf7m6ye
EnfL1iZ4JpNJarjpA5DJU1LZEGhGlafTg4nonZTYhhbRiIGQpUqrBS3+J/5PTsF2
dbcGkeEDDyk6HTN3Z1Fa3XFVt1s+fW+1ZIoXD1JDcMuRPnqalecUFQoEmFOLE8Nu
JNKuAGGEosXBy6l9p5AJmPZVhde1roPqSwCnV0/rUTaViG8+au4lQoq4DG82xEla
eYJK98PdsPucoxwDHTdI1L+QoJGlQf3u3NESfyLzD1O0T/tAQbVqN+30KGZDe6f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1WXfvXVZcgIJeEX8lRaJK7qe8rxv4
5s3f0v0XrmEZTKrm2TbH20/nr1prmNbCZJNKugak2lwuEtoT5ht3kFrY7FFixKfd
0o/70rw6c9JfnRHTh6pgPkujUrW3mv1z/HtbLk0xUY/DHR43UW4+0pmGAQpz6Dw7
C+OZKscU+8HwM3w16R1Oj5hHbW+gkau+du4YK0pR5X0jUIMQTY/l9NuUB2niJRnN
AhcjaXEbABEBAAGJAR8EGAECAAkCGwwFAlbhZhEACgkQpScCicQ8ea23ygf/eA9q
9LEaVvwPz9YLvR5LuBV9E1U9xeWMm6vXNTDqxZgLuEfvgkRH9BABG/PskBN147HW
alYB+IVb+sgzVmHqxV9MszWAawr6Opk1KeKpxuMUA/nrjZFaBDQ8hQxQVZoH67kf
VsWggcEhXmVQZ8c9NAMCs2k6ZHfdBuzsJvqYg+m/B8njZ7nBFCq6qY+u1qDJ2HcT
rHE6nyEBzyYEckfauGb8owPKAyfgVGQQ6B3svaohN5LVU2AjLrTLHGdqxKJ0degn
CHJzuJs5nPgQlLO62El8ZMR7dmX+mnJnavfmwKTXsTwaZjki3VPSBrC4T/O+QESB
XMM5nDOC5bhDnFYONA==
=QZwE
-----END PGP PUBLIC KEY BLOCK-----

Still we're waiting for proper file under https://rep.logentries.com/RPM-GPG-KEY-logentries so that yum would work.

Unable to apply puppet manifest

I've added this module to my puppet config using librarian-puppet, and am unable to apply.

  class { 'logentries':
    account_key => 'wefwefwefwef'
  }

When I do so, I get the error:

Error: Could not find dependent Package[logentries-daemon] for Apt::Source[logentries] at /etc/puppet/modules/logentries/manifests/repo/apt.pp:17

My puppet version

ch12:/etc/puppet# puppet --version
3.6.1

Am I missing something?

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.