Version information
This version is compatible with:
- ,
Start using this module
Add this module to your Puppetfile:
mod 'dylanratcliffe-sumologic', '1.0.2'
Learn more about managing modules with a PuppetfileDocumentation
sumologic
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with sumologic
- Development - Guide for contributing to the module
Overview
A module that installs report processors capable of sending puppet logs to sumologic.
Module Description
This module will install the sumologic_stdout
and sumologic_json
report handlers. It also contains puppet code to manage all of the settings required by them.
sumologic_json
Will use danzilio/report_all_the_things to turn the report into a massive JSON file and send that to a specified URL. It is important to note that using this handler will mean that reports are approx 460Kb each and will add up.
sumologic_stdout
Just sends the logs generated by the run to sumologic. This is the same as what you would see in the console.
Setup
The report handlers can be set up manually or using the supplied puppet code:
Manual Setup
To use this module you will need a couple of things, firstly your report handler of choice will need to be added to the puppet.conf
:
reports = sumologic_json,console,puppetdb
You will also need to create a sumologic.yaml
at you confdir (usually /etc/puppetlabs/puppet
) that looks like this:
---
:sumologic_url: '[url_goes_here]'
Automated setup
I have included a class that cal do all of this for you:
Class: sumologic::report_handler
It is important to note that this class requires a restart of the puppet server. This can be implemented with something like this:
class { 'sumologic::report_handler':
notify => Service['pe-puppetserver'],
}
Parameters
report_url
Address to send the reports to
mode
stdout
or json
. Which underlying report handler to use. Stdout will
send only the messages that were printed to stdout for each report while
json will send the entire puppet report as a JSON file, note that this is
approx 430Kb per report but contains awesome info.
Examples
class { 'sumologic':
report_url => 'https://reports.somewhere.com/some/api/endpoint',
mode => 'json',
}
Development
- Fork this repo
- Write a failing test
- Make changes
- Open a pull request
Dependencies
- puppetlabs-stdlib (>= 1.0.0)
- danzilio-report_all_the_things (>= 0.1.0)
- puppetlabs-inifile ()