Coder Social home page Coder Social logo

logstash-filter-rest's Introduction

Logstash REST Filter

This is a filter plugin for Logstash.

It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way.

Documentation

This logstash filter provides an easy way to access RESTful Resources within logstash. It can be used to post data to a REST API or to gather data and save it in your log file.

Usage

1. Installation

You can use the built-in plugin tool of Logstash to install the filter:

$LS_HOME/bin/plugin install logstash-filter-rest

Or you can build it yourself:

git clone https://github.com/lucashenning/logstash-filter-rest.git
bundle install
gem build logstash-filter-rest.gemspec
$LS_HOME/bin/plugin install logstash-filter-rest-0.1.0.gem

2. Filter Configuration

Add the following inside the filter section of your logstash configuration:

rest {
  url => "http://example.com"       # string (required, with field reference: "http://example.com?id=%{id}")
  json => true                      # boolean (optional, default = false)
  method => "post"                  # string (optional, default = "get")
  sprintf => true                   # boolean (optional, default = false, set this to true if you want to use field references in url, header or params)
  header => {                       # hash (optional)
    "key1" => "value1"
    "key2" => "value2"
    "key3" => "%{somefield}"        # Please set sprintf to true if you want to use field references
  }
  params => {                       # hash (optional, only available for method => "post")
    "key1" => "value1"
    "key2" => "value2"
    "key3" => "%{somefield}"        # Please set sprintf to true if you want to use field references
  }
  response_key => "my_key"          # string (optional, default = "rest_response")
}

Contributing

All contributions are welcome: ideas, patches, documentation, bug reports, complaints, and even something you drew up on a napkin.

Programming is not a required skill. Whatever you've seen about open source and maintainers or community members saying "send patches or die" - you will not see that here.

It is more important to the community that you are able to contribute.

For more information about contributing, see the CONTRIBUTING file.

logstash-filter-rest's People

Contributors

lucashenning avatar abdonpijpelink avatar

Watchers

James Cloos 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.