Adoptable Cookbooks List

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.

sumologic-collector Cookbook

This cookbook installs the Sumo Logic collector or updates an existing one if it was set to use Local Configuration Mangement. Installation on Linux uses the shell script
installer and on Windows uses the exe installer. Here are the steps it follows:

Sets up sumo.conf and sumo.json (or the json folder). By default the standard Linux logs (system and security) are captured. On Windows the application and system event logs are captured.

Downloads latest installer

Runs installer

Starts collector and registers with the Sumo Logic service

For collector update, the existing collector must have been switched to use Local Configuration Mangement - see section Make the switch for more details. The steps the cookbook follows:

Verify that the collector folder exists.

(Optional) Recreate sumo.conf and sumo.json (or the json files under the json folder).

Note

Starting from 19.107, there are 2 major extensions to SumoLogic collectors:
* You can configure a collector's parameters from a set of json files under a common folder. Each of the json file will represent a source on that collector. Updates made to a json file will then be reflected on its corresponding source. Note that the format of this kind of file is slightly different from that of the traditional single json file (sumo.json) and they are not compatible. You also need to use the parameter syncSources instead of sources inside sumo.conf. See more details here.
* You can change a collector's existing parameters through local configuration json file(s) continuously. Before this, using collector API was the only option. More information about this is here

Installation

Install the cookbook in your Chef repo (your knife version should be at least 11.10.4 and you should have the knife github plugin installed):
knife cookbook github install SumoLogic/sumologic-collector-chef-cookbook

Specify data bag and item with your access credentials. The data item should
contain attributes accessID and accessKey. Note that attribute names are case sensitive. If the cases mismatch, the values will not appear when chef-client runs. The default data bag/item is
['sumo-creds']['api-creds']

(Optional) Decide if you want to use the Local Configuration Management feature by setting the attribute default['sumologic']['local_management'] properly. By default this feature is on, to leverage the power of Chef.

(Optional) Select the json configuration option (i.e. through a single file or a folder) by setting the attribute default['sumologic']['use_json_path_dir'] appropriately. By default a single json file is used.

(Optional) Check if the path to the json file or the json folder is set correctly in the attribute default['sumologic']['sumo_json_path']. By default this is the path to the json file at /etc/sumo.json on Linux or c:\sumo\sumo.json on Windows.

:configure

Note: The recommended flow to use this is to have the collector installed without
configuration or registration by using the :install actionruby
sumologic_collector 'C:\sumo' do
collector_name 'fileserver'
sumo_access_id 'MYACCESSID'
sumo_access_key 'MYACCESSKEY'
proxy_host 'proxy.mydomain.com'
proxy_port '8080'
action :configure
end

Sets proxy NTLM domain when a proxy server is used with NTLM authentication

nil

false

:install_and_configure, :configure

sources

String

Sets the JSON file describing sources to configure on registration

nil

false

:install_and_configure, :configure

sync_sources

String

Sets the JSON file describing sources to configure on registration, which will be continuously monitored and synchronized with the Collector's configuration

nil

false

:install_and_configure, :configure

ephemeral

Boolean

When true, the Collector will be deleted after goes offline for a certain period of time

false

false

:install_and_configure, :configure

clobber

Boolean

When true, if there is any existing Collector with the same name, that Collector will be deleted

false

false

:install_and_configure, :configure

disable_script_source

Boolean

If your organization's internal policies restrict the use of scripts, you can disable the creation of script-based Script Sources. When this parameter is passed, this option is removed from the Sumo Logic Web Application, and Script Source cannot be configured

false

false

:install_and_configure, :configure

runas_username

String

Which user the daemon will run as

nil

false

:install_and_configure, :install

winrunas_password

String

On Windows, the password for the user the service will run as

nil

false

:install_and_configure, :install

skip_registration

Boolean

When true the collector will not register upon installation

false

nil

:install_and_configure

sumologic_collector_installer

Note: sumologic_collector_installer has been deprecated, please use sumologic_collector with the :install_and_configure action (the default)

Allows for additional customisation of the Sumo Logic Collector installer

Actions

default = :install

:install - installs the Sumo Logic Collector if it is not already installed