cookbook 'snu-sumologic', '= 2.0.0'
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.
snu-sumologic (16) Versions 2.0.0 Follow2
Installs/configures the Sumologic collector and sources
cookbook 'snu-sumologic', '= 2.0.0', :supermarket
knife supermarket install snu-sumologic
knife supermarket download snu-sumologic
Snu-Sumologic Cookbook
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 theinstallation
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 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 |
* | * | * |
* 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 with a collector to enable an accumulator pattern.
- Set some opinionated defaults based on our Sumo usage.
- Define an additional
:delete
action. - Determine what directory to store the source's config in by examining a
specified
snu_sumologic_collector
resource in the same run context.
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 |
---|---|---|
collector | 'default' |
The collector resource this source belongs to |
source_json_directory | The collector's sync_sources | 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
- Jonathan Hartman jonathan.hartman@socrata.com
- Joe Nunnelley joe.nunnelley@socrata.com
- Andrew Gall andrew.gall@socrata.com
- Ayn Leslie ayn.leslie@socrata.com
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
v2.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
v1.2.0 (2017-10-25)
- Use the Chef node name instead of FQDN for the collector name
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
2.0.0 failed this metric
Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
2.0.0 passed this metric
Foodcritic Metric
2.0.0 passed this metric
License Metric
2.0.0 passed this metric
No Binaries Metric
2.0.0 passed this metric
Testing File Metric
2.0.0 passed this metric
Version Tag Metric
2.0.0 passed this metric
2.0.0 failed this metric
2.0.0 passed this metric
Foodcritic Metric
2.0.0 passed this metric
License Metric
2.0.0 passed this metric
No Binaries Metric
2.0.0 passed this metric
Testing File Metric
2.0.0 passed this metric
Version Tag Metric
2.0.0 passed this metric
2.0.0 passed this metric
2.0.0 passed this metric
No Binaries Metric
2.0.0 passed this metric
Testing File Metric
2.0.0 passed this metric
Version Tag Metric
2.0.0 passed this metric
2.0.0 passed this metric
2.0.0 passed this metric
Version Tag Metric
2.0.0 passed this metric
2.0.0 passed this metric