Giter Club home page Giter Club logo

filebeat-formula's Introduction

filebeat formula

Install and configure filebeat.

See the full Salt Formulas installation and usage instructions.

Available states

  • filebeat.install
  • filebeat.config
  • filebeat.service

filebeat.install

Installs the filebeat package.

filebeat.config

configures filebeat, and installs rc levels for startup on reboot.

Usage

See pillar.example for example configuration.

Please be aware not all config items will work with all versions of Filebeat:

  • close_older >= 1.1.0
  • multiline, include_lines, exclude_lines >= 1.2.0

Overriding defaults

This formula puts some system specific configuration in map.jinja. the may be overridden in your pillar data like so:

filebeat:
  lookup:
    config_source: salt://mycustom/filebeat/filebeat.jinja

filebeat.service

Starts the filebeat service.

Due to filebeat requiring tty to start, this state uses a SSH loopback to achieve this. (use_vt / sudoers !requiretty did not resolve this on 2015.8.x...)

Testing

Testing is done with Test Kitchen for machine setup and testinfra for integration tests.

Requirements

  • Python

  • Ruby

  • Docker

    pip install -r requirements.txt gem install bundler bundle install bundle exec kitchen test

filebeat-formula's People

Contributors

blbradley avatar bunjamins avatar cybacolt avatar dosullivan avatar gravyboat avatar kevinschmidt avatar pprkut avatar tangresh avatar wwentland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filebeat-formula's Issues

filebeat is restarted on every highstate run

Since #5 , the filebeat.service is a cmd.run without unless which means it's run on every highstate run. As I'm running highstate every 5 minutes, filebeat restarts every 5 minutes.

I changed cmd.run to cmd.wait locally in my repo but that unfortunately means the service is only started on config file changes (because of watch_in) but not if it is not running e.g. because of a crash. I'm not sure what a good way to solve this would look like.

Jinja variable 'str object' has no attribute 'paths'

Hello!

With no pillar data, the formula currently fails with this error. Here is the failed state:

       ----------
                 ID: filebeat.config
           Function: file.managed
               Name: /etc/filebeat/filebeat.yml
             Result: False
            Comment: Unable to manage file: Jinja variable 'str object' has no attribute 'paths'
            Started: 22:09:01.721626
           Duration: 18.875 ms
            Changes:   

I found this while applying a test suite for this formula. Test suite and fix coming soon!

update needed

might need to update this formula with the most recent repositories location or at least mentionning for what Filebeat version this formula is

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.