项目作者: wbotelhos

项目描述 :
RSYLOG Cookbook for Chef
高级语言: Ruby
项目地址: git://github.com/wbotelhos/chef-rsyslog.git
创建时间: 2018-04-30T01:08:35Z
项目社区:https://github.com/wbotelhos/chef-rsyslog

开源协议:MIT License

下载


RSYSLOG

Cookbook
Support

Installs and configure RSYSLOG.

Config

  • node['chef-rsyslog']['configure']: Arguments given to configure command before compile
  • node['chef-rsyslog']['files']: Files you want to watch
  • node['chef-rsyslog']['modules']: Built-in modules: datadog

  • node['chef-rsyslog']['dir_create_mode']: doc

  • node['chef-rsyslog']['file_create_mode']: doc
  • node['chef-rsyslog']['file_group']: doc
  • node['chef-rsyslog']['file_owner']: doc
  • node['chef-rsyslog']['polling_interval']: Time in second to execute the polling on file
  • node['chef-rsyslog']['priv_drop_to_group']: doc
  • node['chef-rsyslog']['priv_drop_to_user']: doc
  • node['chef-rsyslog']['umask']: doc

  • node['chef-rsyslog']['source']['checksum']: Checksum of the downloaded tarball

  • node['chef-rsyslog']['source']['extension']: The extension of the downloaded tarball
  • node['chef-rsyslog']['source']['uri']: The URI, with no file name of the downloaded tarball
  • node['chef-rsyslog']['source']['version']: The version number of the downloaded tarball

  • node['chef-rsyslog']['source']['folder_name']: The folder name of the downloaded tarball

  • node['chef-rsyslog']['source']['file_name']: The file name of the downloaded tarball
  • node['chef-rsyslog']['source']['file_path']: The file path where tarball will be saved
  • node['chef-rsyslog']['source']['folder_path']: The folder path where tarball will be extracted
  • node['chef-rsyslog']['source']['url']: The URL for download of the tarball

  • node['chef-rsyslog']['libfastjson']['source']['checksum']: Checksum of the downloaded tarball

  • node['chef-rsyslog']['libfastjson']['source']['extension']: The extension of the downloaded tarball
  • node['chef-rsyslog']['libfastjson']['source']['uri']: The URI, with no file name of the downloaded tarball
  • node['chef-rsyslog']['libfastjson']['source']['version']: The version number of the downloaded tarball

  • node['chef-rsyslog']['libfastjson']['source']['folder_name']: The folder name of the downloaded tarball

  • node['chef-rsyslog']['libfastjson']['source']['file_name']: The file name of the downloaded tarball
  • node['chef-rsyslog']['libfastjson']['source']['file_path']: The file path where tarball will be saved
  • node['chef-rsyslog']['libfastjson']['source']['folder_path']: The folder path where tarball will be extracted
  • node['chef-rsyslog']['libfastjson']['source']['url']: The URL for download of the tarball

  • node['chef-rsyslog']['source']['dependencies']: Libs needed to precompile and configurates the RSYSLOG

Usage

Berkshelf

  1. source 'https://supermarket.chef.io'
  2. cookbook 'chef-rsyslog'

Node

The following nodes is an example of the minimal needed to run correctly this cookbook:

  1. {
  2. "run_list": [
  3. "recipe[chef-rsyslog]"
  4. ]
  5. }
Files

By default, the path of the files will be used as Tag on imfile replacing / by _.

  1. "chef-rsyslog": {
  2. "files": [
  3. "/var/log/nginx/access.log",
  4. }
  5. }

The path /var/log/nginx/access.log wil be a Tag like _var_log_nginx_access.log.
If you want a custom tag, just pass the name separated by a space after the file name.

  1. "chef-rsyslog": {
  2. "files": [
  3. "/var/log/nginx/access.log nginx_access",
  4. }
  5. }

Now Tag will be nginx_access.

Modules

Modules are configurations pre written for you, just pass your credentials.

Datadog

Just add the the Datadog API Key and it will work out of box:

  1. "modules": {
  2. "datadog": {
  3. "api_key": "my_api_key"
  4. }
  5. }