Coder Social home page Coder Social logo

gentitope / chef-logstash Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wearethefoos/chef-logstash

0.0 2.0 0.0 372 KB

Basic Logstash cookbook for Chef that installs Logstash from the official package repo's.

License: MIT License

Ruby 100.00%

chef-logstash's Introduction

chef-logstash cookbook

Basic Logstash cookbook for Chef that installs Logstash from the official package repositories.

Requirements

Tested on Ubuntu/Debian but should work on other platforms as well.

Usage

Just include the default recipe logstash::default.

Server

Put the following in your logstash server attributes:

{
    "logstash": {
        "version": "1.4",

        "server": {
            "enabled": true,
            "inputs": [
                {
                    "rabbitmq": {
                        "exchange": "rawlogs",
                        "user": "username",
                        "password": "verysecret",
                        "host": "rabbitmq.example.com",
                        "type": "all"
                    }
                }
            ],
            "outputs": [
                {
                    "elasticsearch": {
                        "host": "elasticsearch.example.com",
                        "cluster": "logstash"
                    }
                }
            ]
        },

        "agent": {
            "inputs": [
                {
                    "file": {
                        "path": ["/var/log/*.log"],
                        "exclude": ["*.gz"],
                        "type": "syslog"
                    }
                }
            ],

            "outputs": [
                {
                    "rabbitmq": {
                        "host": "rabbitmq.example.com",
                        "port": "5672",
                        "user": "username",
                        "password": "verysecret",
                        "exchange": "logstash",
                        "exchange_type": "fanout"
                    }
                }
            ]
        }
    }
}

Agent

And put this in your agents' attributes:

{
    "logstash": {
        "version": "1.4",

        "agent": {
            "inputs": [
                {
                    file {
                        "path": ["/var/log/*.log"],
                        "exclude": ["*.gz"],
                        "type": "syslog"
                    }
                }
            ],

            "outputs": [
                {
                    "rabbitmq": {
                        "host": "rabbitmq.example.com",
                        "port": "5672",
                        "user": "username",
                        "password": "verysecret",
                        "exchange": "logstash",
                        "exchange_type": "fanout"
                    }
                }
            ]
        }
    }
}

Attributes

Default

node[:logstash][:version] = "1.4"            # The version to install.

Agent

node[:logstash][:agent][:enabled] = true    # Enable agent.
node[:logstash][:agent][:inputs]  = []      # Inputs configuration, see http://logstash.net/docs/1.4.1/
node[:logstash][:agent][:outputs] = []      # Outputs configuration, see http://logstash.net/docs/1.4.1/

Server

node[:logstash][:server][:enabled] = false   # Enable server (default: false, agent only).
node[:logstash][:server][:inputs]  = []      # Inputs configuration, see http://logstash.net/docs/1.4.1/
node[:logstash][:server][:outputs] = []      # Outputs configuration, see http://logstash.net/docs/1.4.1/

Recipes

Default

Meta recipe to install the packages and configure the server and/or agent.

Apt

Installs Logstash from the Debian packages.

Yumrepo

Installs Logstash from the Yum repo packages.

Agent

Configures the agent.

Server

Configures the server.

Thanks to

Author

Author:: Wouter de Vos - Springest ([email protected])

chef-logstash's People

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.