cookbook 'filebeat', '= 0.2.0'
filebeat
(36) Versions
0.2.0
-
Follow19
Installs/Configures Elastic Filebeat
cookbook 'filebeat', '= 0.2.0', :supermarket
knife supermarket install filebeat
knife supermarket download filebeat
filebeat Cookbook
This is a Chef cookbook to manage Filebeat.
For Production environment, always prefer the most recent release.
Most Recent Release
cookbook 'filebeat', '~> 0.2.0'
From Git
cookbook 'filebeat', github: 'vkhatri/chef-filebeat'
Repository
https://github.com/vkhatri/chef-filebeat
Supported OS
This cookbook was tested on Windows, Amazon & Ubuntu Linux and expected to work on other RHEL platforms.
Cookbook Dependency
- windows
Recipes
filebeat::default
- default recipe (use it for run_list)filebeat::install
- install filebeatfilebeat::config
- configure filebeat
Core Attributes
default['filebeat']['version']
(default:1.0.0-rc2
): filebeat versiondefault['filebeat']['package_url']
(default:auto
): package urldefault['filebeat']['conf_dir']
(default:/etc/filebeat
): filebeat yaml configuration file directorydefault['filebeat']['conf_file']
(default:/etc/filebeat/filebeat.yml
): filebeat configuration filedefault['filebeat']['notify_restart']
(default:true
): whether to restart filebeat service on configuration file changedefault['filebeat']['disable_service']
(default:false
): whether to stop and disable filebeat servicedefault['filebeat']['enable_localhost_output']
(default:true
): by default add localhosthosts
for outputelasticsearch
andlogstash
default['filebeat']['prospectors_dir']
(default:/etc/filebeat/conf.d
): prospectors configuration file directorydefault['filebeat']['prospectors']
(default:{}
): prospectors configuration file
Configuration File filebeat.yml Attributes
default['filebeat']['config']['filebeat']['prospectors']
(default:[]
): filebeat interface device namedefault['filebeat']['config']['filebeat']['registry_file']
(default:/var/lib/filebeat/registry
): filebeat services to capture packetsdefault['filebeat']['config']['filebeat']['config_dir']
(default:node['filebeat']['prospectors_dir']
): filebeat prospectors configuration files folderdefault['filebeat']['config']['output']['elasticsearch']['enabled']
(default:true
): enable elasticsearch outputdefault['filebeat']['config']['output']['elasticsearch']['hosts']
(default:[]
): elasticsearch hostsdefault['filebeat']['config']['output']['elasticsearch']['save_topology']
(default:false
):default['filebeat']['config']['output']['logstash']['enabled']
(default:true
): enable logstash outputdefault['filebeat']['config']['output']['logstash']['hosts']
(default:[]
): logstash hostsdefault['filebeat']['config']['output']['logstash']['loadbalance']
(default:true
): set true to load balance between logstash hostsdefault['filebeat']['config']['output']['logstash']['index']
(default:filebeat
): logstash index namedefault['filebeat']['config']['output']['logstash']['tls']['enabled']
(default:false
):default['filebeat']['config']['output']['logstash']['save_topology']
(default:false
):default['filebeat']['config']['output']['file']['enabled']
(default:false
):default['filebeat']['config']['output']['file']['path']
(default:/tmp/filebeat
):default['filebeat']['config']['output']['file']['filename']
(default:filebeat
):default['filebeat']['config']['output']['file']['rotate_every_kb']
(default:10240
):default['filebeat']['config']['output']['file']['number_of_files']
(default:7
):
For more attribute info, visit below links:
https://github.com/elastic/filebeat/blob/master/etc/filebeat.yml
How to Add Filebeat Prospectors via Node Attribute
Individual propspectors configuration file can be added using attribute default['filebeat']['prospectors']
. Each prospector configuration will
be created as a different yaml file under default['filebeat']['prospector_dir']
with prefix prospector-
"default_attributes": {
"filebeat": {
"prospectors": {
"system_logs": {
"filebeat": {
"prospectors": [
{
"paths": [
"/var/log/messages",
"/var/log/syslog"
],
"type": "log",
"fields": {
"type": "system_logs"
}
}
]
}
},
"secure_logs": {
"filebeat": {
"prospectors": [
{
"paths": [
"/var/log/secure",
"/var/log/auth.log"
],
"type": "log",
"fields": {
"type": "secure_logs"
}
}
]
}
},
"apache_logs": {
"filebeat": {
"prospectors": [
{
"paths": [
"/var/log/apache/*.log"
],
"type": "log",
"ignore_older": "24h",
"scan_frequency": "15s",
"harvester_buffer_size": 16384,
"fields": {
"type": "apache_logs"
}
}
]
}
}
}
}
}
Above configuration will create three different prospector files - prospector-system_logs.yml, prospector-secure_logs.yml and prospector-apache_logs.yml
Contributing
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests (
rake & rake knife
), ensuring they all pass - Write new resource/attribute description to
README.md
- Write description about changes to PR
- Submit a Pull Request using Github
Copyright & License
Authors:: Virender Khatri and Contributors
<pre>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
</pre>
Dependent cookbooks
windows >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
filebeat CHANGELOG
This file is used to list changes made in each version of the filebeat cookbook.
0.2.0
Brandon Wilson - Include dpkg options to keep old config files when upgrading filebeat to a new release. Without specifying the dpkg options, dpkg will attempt to interactively ask if it should keep the old conf file, or replace it with the vendor supplied conf file which comes with the new version of the package. Since chef is running dpkg non-interactively, it causes dpkg to exit with code 1, and the chef run fails.
Virender Khatri - Fix for #4, handle derived attribute for package_url
Patrick Christopher - Added support for Windows OS
0.1.0
- Virender Khatri - Initial release of filebeat
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
0.2.0 passed this metric
0.2.0 passed this metric