Closed matt-smith closed 8 years ago
Hey @matt-smith,
There's a bunch of resources attributes that are common to all the source resource types that you can use. See here.
For example:
node['sumologic']['files'].each do |key,value|
sumo_source_local_file key do
source_json_directory node['sumologic']['sumo_json_path']
path_expression value.path_expression
source_category 'MySourceCategory'
filters [
{
'filterType' => 'Mask',
'name' => 'MyFilter',
'regexp' => '*exclude (this)*',
'mask' => '####'
}
]
end
end
Thanks for getting back to me @zl4bv, I tried this out and it looks to be working perfectly.
Afternoon All,
Just trying to work out the best way to configure several local file sources, at the moment we are using a wrapper cookbook and are looping over the sumo_source_local_file resource.
My question is, how do we configure the category, filters etc? where should those options go?
I cant see that you can pass anything else to sumo_source_local_file resource?
https://github.com/SumoLogic/sumologic-collector-chef-cookbook/blob/master/libraries/resource_local_file_source.rb
I may be completely misunderstanding the way that the collector is configured, is it possible to configure categories on a per file basis? For example, applicationLogs and osLogs?