Giter VIP home page Giter VIP logo

puppet-cirrus_logstash's Introduction

logstash

Table of Contents

  1. Overview
  2. Module Description
  3. Setup - Endpoints

Overview

This module uses the puppetlabs logstash module to install logstash and configure one of three types of end points.

Setup

Once logstash is installed we will need to manage logstash endpoints.

Inputs

Inputs will generally be from the beats protocol, this is handled by the beats input plugin which is installed by default. We can also except traffic from any rsyslog client on port 5000.

input {
  tcp {
   type => syslog
   port => 5000
  }
  udp {
   type => syslog
   port => 5000
  }
}
input {
  beats {
   port => 5044
  }
}

Filters

Filters will be created as needed and provided by the Openstack community, below is an example of a simple rsyslog filter:

filter {
  if [type] == "syslog" {
    grok {
      match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
    }
    syslog_pri { }
    date {
      match => [ "syslog_timestamp", "MMM  d HH:mm:ss", "MMM dd HH:mm:ss" ]
    }
    if !("_grokparsefailure" in [tags]) {
      mutate {
        remove_field => [ "message", "@version" ]
      }
    }
  }
}

Outputs

In most cases outputs for logstash will be elasticsearch. Since all logstash hosts are also elasticsearch clients we can send most outputs to localhost.

output {
  elasticsearch { 
    hosts => ["localhost:9200"] 
    sniffing => true
    manage_template => false
  }
}

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.