Commit 22e7b7d7 authored by Duc Ha's avatar Duc Ha Committed by GitHub
Browse files

Merge pull request #116 from aquantumofdata/master

Adds the ability to change the default category in the files added to the sumo sources folder.
parents da1ed853 f800bdc7
......@@ -2,6 +2,10 @@
This file is used to list changes made in each version of sumologic-collector.
## 1.2.18
* Adds the ability to define the source categories for the default files created in the json source
folder.
## 1.2.17
* Merged PR#85,86 : Add service retries attempts and delays, fixed online help doc link.
......
......@@ -94,6 +94,13 @@ when 'redhat', 'centos', 'scientific', 'fedora', 'suse', 'amazon', 'oracle', 'de
# Collector Restart Command
default['sumologic']['collectorRestartCmd'] = "#{default['sumologic']['installDir']}/collector restart"
# Syslog source category
default['sumologic']['syslog_cat'] = 'OS/Linux/System'
# Security source category
default['sumologic']['security_cat'] = 'OS/Linux/Security'
when 'windows'
# Install Path
default['sumologic']['installDir'] = 'C:/sumo' # We'd like to set this to C:/Program Files/Sumo Logic Collector', but there are issues with the Program Files directory.
......
......@@ -7,7 +7,7 @@ source_url 'https://github.com/SumoLogic/sumologic-collector-chef-cookbook' if r
license 'Apache v2.0'
description 'Installs/Configures sumologic-collector'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.2.17'
version '1.2.18'
attribute 'sumologic/credentials/bag_name',
display_name: "Credentials bag name",
type: "string",
......
......@@ -43,11 +43,17 @@ if !platform?('windows')
template "#{node['sumologic']['sumo_json_path']}/localfile-system.json" do
cookbook node['sumologic']['json_config_cookbook']
source "localfile-system-dir.json.erb"
variables({
:category => node['sumologic']['syslog_cat']
})
end
template "#{node['sumologic']['sumo_json_path']}/localfile-security.json" do
cookbook node['sumologic']['json_config_cookbook']
source "localfile-security-dir.json.erb"
variables({
:category => node['sumologic']['security_cat']
})
end
# This is an example of another local file source, note the use of variables in this template
......
......@@ -9,7 +9,7 @@
"useAutolineMatching": true,
"forceTimeZone": false,
"timeZone": "UTC",
"category": "OS/Linux/Security",
"category": "<%= @category %>",
<% case node["platform_family"] -%>
<% when 'rhel' %>
"pathExpression":"/var/log/secure"
......
......@@ -9,7 +9,7 @@
"useAutolineMatching": true,
"forceTimeZone": false,
"timeZone": "UTC",
"category": "OS/Linux/System",
"category": "<%= @category %>",
<% case node["platform_family"] -%>
<% when 'rhel' %>
"pathExpression":"/var/log/messages"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment