Code Monkey home page Code Monkey logo

ansible-filebeat's Introduction

Ansible Filebeat role

Ansible Galaxy

Installs Elastic's Filebeat for forwarding logs.

Changelog

12/05/2016

  • Ability to upload TLS certificate to target.
  • Optional configuration support for monit.

Role Variables

  • filebeat_config - YAML representation of your filebeat config. This is templated directly into the configuration file as YAML. See the example configuration for an exhaustive list of configuration options. Defaults to:
filebeat_config:
  filebeat:
    prospectors:
      - paths:
          - /var/log/messages
          - /var/log/*.log
        input_type: log
  output:
    file:
      path: /tmp/filebeat
      filename: filebeat
  logging:
    to_syslog: true
    level: error

You can also store the config in separate filebeat.yml file and include it using lookup:

filebeat_config: "{{ lookup('file', './filebeat.yml')|from_yaml }}"
  • filebeat_ssl_certificate - Contents of the SSL certificate that will be uploaded at /etc/filebeat/forwarder.crt. Make sure your config reflects the path.
  • filebeat_monit_config - Absolute path to place the monit config file. Optional. Will not be placed if not defined.

Common Configurations

Connecting to Elasticsearch (with TLS):

filebeat_config:
  filebeat:
    prospectors:
      - paths:
          - "/var/log/elasticsearch/elasticsearch_index_indexing_slowlog.log"
          - "/var/log/elasticsearch/elasticsearch_index_search_slowlog.log"
        fields:
          type: "elasticsearch_slow_logs"
          app: "elk"
  output:
    logstash:
      hosts: [ "localhost:5044" ]
      tls:
        certificate_authorities: [ "/etc/filebeat/forwarder.crt" ]
  logging:
    to_syslog: false
    to_files: true
    files:
      path: /var/log/filebeat
      name: filebeat.log
      rotateeverybytes: 10485760
      keepfiles: 7
    level: info

License

BSD

Author Information

David Wittman Raj Perera (@rajiteh)

ansible-filebeat's People

Contributors

davidwittman avatar jamesbelchamber avatar rajiteh avatar vorou 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.