Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

The snu-sumologic cookbook has been deprecated

Author provided reason for deprecation:

The snu-sumologic cookbook has been deprecated and is no longer being maintained by its authors. Use of the snu-sumologic cookbook is no longer recommended.

RSS

snu-sumologic (16) Versions 1.1.0

Installs/configures the Sumologic collector and sources

Policyfile
Berkshelf
Knife
cookbook 'snu-sumologic', '= 1.1.0', :supermarket
cookbook 'snu-sumologic', '= 1.1.0'
knife supermarket install snu-sumologic
knife supermarket download snu-sumologic
README
Dependencies
Changelog
Quality 86%

Snu-Sumologic Cookbook

Cookbook Version
Build Status
Coverage Status

An opinionated implementation of installation and configuration of the Sumo
Logic collector using the sumologic-collector cookbook.

Requirements

This cookbook requires at least Chef 12. It is tested against the two most
major Chef versions (currently 13.x and 12.x) and the two most recent Ubuntu
LTS (currently 16.04 and 14.04) and CentOS (currently 7.x and 6.x) releases.

It expects to find Sumo Logic API credentials in a data bag item named
sumologic within a data bag named credentials. That data bag item must
contain keys for both accessID and accessKey.

Usage

Add one or more of the included recipes to your run list and/or declare
instances of the included resources in your own recipes.

Recipes

default

  • Runs the installation, configuration, and monitoring recipes.

installation

  • Uses the snu_sumologic_collector resource to install the collector app, unconfigured, into /opt/SumoCollector.
  • This recipe performs no configuration and is ideal for e.g. baking the Sumo collector into a base system image.

configuration

  • Pulls Sumo Logic credentials out of the configured credentials data bag.
  • Uses the snu_sumologic_collector resource to configure and start the collector that should have already been installed by the installation recipe.
  • Uses a delayed action to, at the end of the Chef run, empty the sources directory of any files that are no longer in Chef's resource collection.

monitoring

  • Ensures Sensu is installed and makes the sensu user a member of the Sumo group so it's able to monitor logs in /opt/SumoCollector.
  • At some point in the future, this recipe will include configuring Sensu checks for the Sumo collector.

Attributes

default

The configuration recipe pulls Sumo credentials out of a data bag that is
configurable via two attributes:

default['sumologic']['credentials']['bag_name'] = 'credentials'
default['sumologic']['credentials']['item_name'] = 'sumologic'

An empty config hash is defined that can be overridden to pass any additional
properties to the snu_sumologic_collector resource in the configuration
recipe:

default['snu_sumologic']['config'] = {}

Resources

snu_sumologic_collector

A wrapper around the sumologic_collector resource to:

  • Set some opinionated defaults based on our Sumo usage.
  • Manage the configured Sumo sources directory.

Syntax:

snu_sumologic_collector 'default' do
  sumo_access_id 'abc123'
  sumo_access_key 'def456'
  action %i[configure enable start]
  delayed_action :manage
end

Actions:

Action Description
:install Install the collector, unconfigured
:install_and_configure Install + configure the collector
:configure Configure an alread-installed collector
:manage Delete any source configs not in Chef's resource collection*
:remove Uninstall the collector
:start Start the collector
:stop Stop the collector
:restart Restart the collector
:enable Enable the collector
:disable Disable the collector

* The :manage action should only be used as a delayed_action, otherwise
files it decides to delete will depend on the ordering of Chef's run
context.

Properties:

Property Default Description
sumo_access_id nil Needed for the :configure action
sumo_access_key nil Needed for the :configure action
dir '/opt/SumoCollector Set a default install dir
collector_name node['fqdn'] Assume a unique FQDN and set it as the name
sync_sources '/etc/sumo.d' Assume a .d-style sources configuration
ephemeral true Set a cloud-friendly default
clobber true Set a cloud-friendly default
runas_username 'root' Work around a bug in the Sumo install script
wrapper_java_initmemory 256 Set larger defaults for the Java heap size
wrapper_java_maxmemory 256 Set larger defaults for the Java heap size
* * *

* All other properties are identical to those in the sumologic_collector
resource.

snu_sumo_source_local_file

A wrapper around the sumo_source_local_file resource to:

  • Set some opinionated defaults based on our Sumo usage.
  • Define an additional :delete action.

Syntax:

snu_sumo_source_local_file 'nginx' do
  path_expression '/var/log/nginx.log'
  action :create
end

Actions:

Action Description
:create Create a config file for the source
:delete Delete the source's config file

Properties:

Property Default Description
source_json_directory '/etc/sumo.d' Set the same default as the collector resource
time_zone 'UTC' Default all logs to UTC
force_time_zone true Force logs to be parsed into UTC
* * *

* All other properties are identical to those in the sumo_source_local_file
resource.

Maintainers

Dependent cookbooks

sumologic-collector ~> 1.2
sensu >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Snu-Sumologic Cookbook CHANGELOG

v1.1.0 (2017-10-04)

  • Default the hostName property to the FQDN

v1.0.0 (2017-08-21)

  • Refactor based on the newer sumologic-collector community cookbook

v0.3.1 (2017-08-23)

  • Replace sources with syncSources in config validator

v0.2.8 (2017-08-21)

  • Make the sensu user a member of the sumologic_collector group

v0.2.5 (2017-08-11)

  • Open up the sumologic-collector version dep a little

v0.2.3 (2016-11-01)

  • Remove duplicate collector attributes

v0.1.100 (2015-08-25)

  • Ensure the rest-client gem is installed before attempting to import it

Collaborator Number Metric
            

1.1.0 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.1.0 passed this metric

Foodcritic Metric
            

1.1.0 passed this metric

License Metric
            

1.1.0 passed this metric

No Binaries Metric
            

1.1.0 passed this metric

Testing File Metric
            

1.1.0 passed this metric

Version Tag Metric
            

1.1.0 passed this metric