Graylog2Client

This gem provides a simple interface to search on a graylog server for a given pattern.

Installation

Add this line to your application's Gemfile:

gem 'graylog2-client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install graylog2-client

Usage

You will need to set some configurations:

config = {
  :url => "http://graylogbackend:9200/graylog2/_search"
}

The stream_id is the id from the required graylog stream. Get an instance of the Graylog parser passing the configuration:

graylog = Graylog2Client::Parser.new config

Get the messages for a given query:

graylog.messages_for("graylogquery*")