Deprecated - Ruby library w/ CLI to search Loggly V1 API
Ruby
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
spec
.gitignore
.rvmrc
.travis.yml
CHANGELOG
Gemfile
LICENSE.txt
README.md
Rakefile
loggly-ruby-client.gemspec

README.md

Build Status

loggly-ruby-client is a basic class with CLI for interacting with Loggly's search API.

Installation

gem install loggly-ruby-client

Getting Started

You can specify your credentials on the command line, however it is best to add them to a configuration file.

default:
  username: your_username
  password: your_password

Usage - CLI

Performing basic search:

loggly-ruby-client -q testquery1

(If account is note specified loggly-ruby-client will look for the default account.)

Multiple queries can be specified and will be joined with ANDs:

loggly-ruby-client -q testquery1 -q testquery2

And inputs can be added, multile inputs will be joined with ORs:

loggly-ruby-client -q testquery1 -q testquery2 -i input1 -i input2

See help for full list of options:

loggly-ruby-client -h

Usage - Class

Create a new LogglyRubyClient object:

require 'loggly-ruby-client'
config = LogglyRubyClient::Config.new(domain:'YOUR_DOMAIN',username:'USERNAME',password:'PASSWORD')
loggly = LogglyRubyClient::API.new(config: config)

Perform basic search:

loggly.search :from  => 'NOW-1HOUR',
              :query => ['testquery1'],
              :input => ['input1']

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request