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 3.1.2

Installs/configures the Sumologic collector and sources

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

Snu-Sumologic Cookbook

Cookbook Version
Build 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 continuously tested against
various OS and Chef combinations:

  • Chef (13, 12)

X

  • Ubuntu (16.04, 14.04)
  • Debian (8)
  • RHEL (7, 6)
  • Fedora (27)

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, and delete any Sumo sources 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[install configure enable start manage]
end

Actions:

Action Description
:install Install the collector, unconfigured
:configure Configure an installed collector
:manage Delete no-longer-configured Sumo sources
: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 works by using an accumulator pattern to have each
snu_sumologic_source_* resource register itself in the node's run state.
A source is considered to belong to the collector with a sync_sources
property that matches its source_json_directory property.

* The :manage action works by using an accumulator pattern to have each
snu_sumologic_source_* resource register itself with the collector at
compile time. The collector is then able to delete any sources on the
filesystem that are no longer being declared in Chef.

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.name Set it to the unique Chef node 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
sources Read from the run state A list of sources belonging to this collector
* * *

* 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:

  • Register each source in the node's run state to enable accumulation and management from a collector resource.
  • 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' The .d-style source config dir
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

apt < 7.0
sensu >= 0.0.0
seven_zip < 3.0
sumologic-collector ~> 1.2

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Snu-Sumologic Cookbook CHANGELOG

This file is used to list changes made in each version of the snu-sumologic
cookbook.

3.1.2 (2018-11-02)

  • Pin to a version of seven_zip compatible with Chef 12

3.1.1 (2018-06-15)

  • Update dependencies test to fix the build

3.1.0 (2018-05-07)

  • Inherit test configs from a central repo where possible
  • Fix the metadata dep string incompatible with Chef 14
  • Leave the collector service disabled after the :install action
  • Run integration tests with Microwave
  • Temporarily patch Systemd compatibility back into the collector resource

3.0.1 (2018-04-13)

  • Pin the apt cookbook to < 7

3.0.0 (2018-03-07)

  • Refactor the source accumulator to use the run state as an intermediary
  • Identify collector:source relationships by their directory on the filesystem
  • Restore support for declaring a source resource with no matching collector
  • Remove the snu_sumo_source_local_file resource's collector property

2.0.1 (2018-02-08)

  • Reload Systemd in the :remove as well as :install action

2.0.0 (2018-01-29)

  • Refactor the source accumulator to accumulate at compile time
  • Make the installation and configuration recipes use one collector resource
  • Change the collector resource's default action to include enable/start/manage
  • Drop the collector resource's :install_and_configure action
  • Use true/false in resource properties instead of TrueClass/FalseClass

1.2.0 (2017-10-25)

  • Use the Chef node name instead of FQDN for the collector name

1.1.0 (2017-10-04)

  • Default the hostName property to the FQDN

1.0.0 (2017-08-21)

  • Refactor based on the newer sumologic-collector community cookbook

0.3.1 (2017-08-23)

  • Replace sources with syncSources in config validator

0.2.8 (2017-08-21)

  • Make the sensu user a member of the sumologic_collector group

0.2.5 (2017-08-11)

  • Open up the sumologic-collector version dep a little

0.2.3 (2016-11-01)

  • Remove duplicate collector attributes

0.1.100 (2015-08-25)

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

Collaborator Number Metric
            

3.1.2 failed this metric

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

Contributing File Metric
            

3.1.2 passed this metric

Foodcritic Metric
            

3.1.2 passed this metric

No Binaries Metric
            

3.1.2 passed this metric

Testing File Metric
            

3.1.2 passed this metric

Version Tag Metric
            

3.1.2 passed this metric