Coder Social home page Coder Social logo

sumologic-sdk-ruby's Introduction

Sumo Logic Ruby SDK

Gem Version Build Status Code Climate Scrutinizer Code Quality Docs License

Ruby interface to the Sumo Logic REST API.

Usage

The Ruby SDK is ported from the Sumo Logic Python SDK.

The following methods are currently implemented:

sumo = SumoLogic::Client.new access_id, access_key

# Search
r = sumo.search query [, from, to, time_zone]

r = sumo.search_job query [, from, to, time_zone]

r = sumo.search_job_messages {'id' => search_job_id}, limit, offset

r = sumo.search_job_records {'id' => search_job_id}, limit, offset

r = sumo.search_job_status {'id' => search_job_id}

# Dashboards
r = sumo.dashboards

r = sumo.dashboard dashboard_id

r = sumo.dashboard_data dashboard_id

# Collectors
r = sumo.collectors [limit, offset]

r = sumo.collector collector_id

r = sumo.update_collector collector, etag

r = sumo.delete_collector collector

# Sources
r = sumo.sources collector_id [, limit, offset]

r = sumo.source collector_id, source_id

r = sumo.update_source collector_id, source, etag

r = sumo.delete_source collector_id, source

# Content
r = sumo.create_content path, data

r = sumo.get_content path

r = sumo.delete_content path

# Low-Level
r = sumo.post path, data

Note, for the search methods, the query parameter can be exactly the same query that is entered into the Sumo Logic web console.

Example scripts are located in the scripts directory of the GitHub repo.

Change Log

See CHANGELOG.md.

Links

Project Repo

Sumo Logic API Documentation

Sumo Logic Python SDK

Contributions

Please add your scripts and programs to the scripts folder.

Any reports of problems, comments or suggestions are most welcome.

Please report these on Github

License

Sumo Logic Ruby SDK is available under an MIT-style license. See LICENSE.md for details.

Sumo Logic Ruby SDK © 2015-2023 by John Wang

sumologic-sdk-ruby's People

Contributors

grokify avatar iainjmitchell avatar jmervine avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sumologic-sdk-ruby's Issues

Add collector methods

Add methods for the following:

  • collectors
  • collector
  • update_collector
  • delete_collector

Add ability to follow redirects

Support redirects as Sumo Logic now has regional API hosts. A 301 redirect is encountered:

  • Request: https://api.sumologic.com/api/v1/...
  • New Location: https://api.us2.sumologic.com/api/v1/...

Currently the SDK can be instantiated with the following but it would be nice to auto-follow redirects:

sdk = SumoLogic::Client.new username, password, `https://api.us2.sumologic.com/api/v1`

Add source methods

Add methods for the following:

  • sources
  • source
  • update_source
  • delete_source

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.