GithubHelp home page GithubHelp logo

ansible-role-filebeat's Introduction

Ansible role for FileBeat

Build Status

An Ansible Role that installs FileBeat on Red Hat/CentOS or Debian/Ubuntu.

Tested On

  • EL / Centos (6 / 7)
  • Debian (Wheezy / Jessie)
  • Ubuntu (Trusty)
  • Solaris

Role Variables

Available variables are listed below, along with their default values as definied in defaults/main.yml.

FileBeat user and group. If you run FileBeat with a user other than root make sure your logs are readable by the FileBeat user. Add the FileBeat user to a privileged group, with access to your logs.

On Ubuntu you would add the user to the adm group. On CentOS you can adjust the permissions with the setfacl command, e.g. sudo setfacl -m g:filebeat:r <path>.

filebeat_user: root
filebeat_group: root

Create the filebeat user and group.

filebeat_create_user: true

FileBeat version to use.

filebeat_version: 1.1.1

Make use of the FileBeat apt repo.

On Debian-based systems, you may use a URL to install a specific .deb. To do so, change filebeat_use_apt_repo value to false, then (optionally) adjust the value of filebeat_deb_baseurl (which has a default value set for you).

filebeat_use_apt_repo: true

FileBeat .deb base URL for package download if filebeat_use_apt_repo: false

filebeat_deb_baseurl: "https://download.elastic.co/beats/filebeat"

Start FileBeat at boot time.

filebeat_start_at_boot: true

FileBeat version upgrade. This option allows package upgrades.

filebeat_upgrade: false

FileBeat configuration file.

filebeat_config_file: /etc/filebeat/filebeat.yml

FileBeat registry file.

filebeat_config_registry_file: /var/lib/filebeat/registry

The FileBeat configuration is built based on the variable filebeat_config. For easier management of the contents, the filebeat_config variable is made up of multiple other variables:

  • filebeat_config_prospectors
  • filebeat_config_output
  • filebeat_config_shipper
  • filebeat_config_logging
filebeat_config_prospectors: |
  filebeat:
    prospectors:
      -
        input_type: log
        paths:
          - /var/log/*.log
        registry_file: "{{filebeat_config_registry_file}}"
filebeat_config_output: |
  output:
    elasticsearch:
      hosts: [ 'localhost:9200' ]
filebeat_config_shipper: |
  shipper:
filebeat_config_logging: |
  logging:
    files:
      rotateeverybytes: 10485760 # = 10MB
filebeat_config: |
  {{filebeat_config_prospectors}}
  {{filebeat_config_output}}
  {{filebeat_config_shipper}}
  {{filebeat_config_logging}}

Usage

    - hosts: logging
      roles:
        - { role: torian.filebeat }

License

See License

Author Information

This role was created in 2016 by Emiliano Castagnari.

ansible-role-filebeat's People

Contributors

automationd avatar leifmadsen avatar sirkjohannsen avatar torian avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.