cookbook 'sumologic-collector', '= 1.2.4'
sumologic-collector
(29) Versions
1.2.4
-
Follow15
Installs/Configures sumologic-collector
cookbook 'sumologic-collector', '= 1.2.4', :supermarket
knife supermarket install sumologic-collector
knife supermarket download sumologic-collector
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
andsumo.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
andsumo.json
(or the json files under the json folder). - Restart the collector for the changes to take effect.
The collector Requires outbound access to https://collectors.sumologic.com.
Edit sumo.json
(or the json files under the json folder) to add/edit/remove sources. After installation you can
test connectivity.
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
- Create an Access Key
- 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
andaccessKey
. 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 orc:\sumo\sumo.json
on Windows. - Upload the cookbook to your Chef Server:
knife cookbook upload sumologic-collector
- Add the
sumologic-collector
receipe to your node run lists. This step depends on your node configuration, so specifics will not be described in this README.md.
Attributes
<table>
<tr>
<td>['sumologic']['ephemeral']</td>
<td>Boolean</td>
<td>Sumo Logic Ephemeral Setting</td>
<td>Required</td>
</tr>
<tr>
<td>['sumologic']['installDir'] </td>
<td>String</td>
<td>Sumo Logic Install Directory</td>
<td>Required</td>
</tr>
<tr>
<td>['sumologic']['credentials']['bag_name']</td>
<td>String</td>
<td>Name of the data bag.</td>
<td>Required</td>
</tr>
<tr>
<td>['sumologic']['credentials']['item_name']</td>
<td>String</td>
<td>Name of the item within the data bag. </td>
<td>Required</td>
</tr>
<tr>
<td>['sumologic']['credentials']['secret_file']</td>
<td>String</td>
<td>Path to the local file containing the encryption secret key.</td>
<td>Optional</td>
</tr>
</table>
Contributing
This cookbook is meant to help customers use Chef to install Sumo Logic
collectors, so please feel to fork this repository, and make whatever changes
you need for your environment.
License and Authors
Authors:
Ben Newton (ben@sumologic.com), Duc Ha (duc@sumologic.com)
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
CHANGELOG for sumologic-collector
This file is used to list changes made in each version of sumologic-collector.
0.1.0:
- Initial release of sumologic-collector
1.2.00:
- Updated cookbook to support Access IDs and Keys
1.3.00
- Updated cookbook to support Local Collector Management and JSON directory option.
Check the Markdown Syntax Guide for help with Markdown.
The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.
Foodcritic Metric
1.2.4 failed this metric
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumoconf.rb:34
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumoconf.rb:35
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumoconf.rb:50
FC002: Avoid string interpolation where not required: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumojsondir.rb:31
FC007: Ensure recipe dependencies are reflected in cookbook metadata: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/install_proxy.rb:32
FC013: Use file_cache_path rather than hard-coding tmp paths: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/install_proxy.rb:51
FC019: Access node attributes in a consistent manner: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumoconf.rb:34
FC019: Access node attributes in a consistent manner: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumoconf.rb:35
FC019: Access node attributes in a consistent manner: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumoconf.rb:50
1.2.4 failed this metric
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumoconf.rb:35
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumoconf.rb:50
FC002: Avoid string interpolation where not required: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumojsondir.rb:31
FC007: Ensure recipe dependencies are reflected in cookbook metadata: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/install_proxy.rb:32
FC013: Use file_cache_path rather than hard-coding tmp paths: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/install_proxy.rb:51
FC019: Access node attributes in a consistent manner: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumoconf.rb:34
FC019: Access node attributes in a consistent manner: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumoconf.rb:35
FC019: Access node attributes in a consistent manner: /tmp/cook/cf95df172edd9fcaca16c9d0/sumologic-collector/recipes/sumoconf.rb:50