GithubHelp home page GithubHelp logo

isabella232 / sumologic-export Goto Github PK

View Code? Open in Web Editor NEW

This project forked from remind101/sumologic-export

0.0 0.0 0.0 168 KB

Easily export your Sumologic log data.

License: The Unlicense

Python 100.00%

sumologic-export's Introduction

sumologic-export

Easily export your Sumologic log data.

Box Sketch

Purpose

At Stormpath we use Sumologic to store our server logs.

We were preparing to export our logs for safe keeping, so I wrote this tool. It uses the Sumologic API and downloads every log stored over a predefined time period.

sumologic-export will grab every single Sumologic log you've ever written and store it in gzipped JSON files.

Installation

Installing sumologic-export is simple -- just use pip!

Once you have pip installed on your computer, you can run the following to install the latest release of sumologic-export:

$ pip install -U sumologic-export

That's it :)

Usage

Before you can export all your Sumologic data, you'll need to configure sumologic-export and give it your Sumologic credentials. To do this, simply run:

$ sumologic-export configure

On the command line. This will prompt you for some basic information, then store your credentials in the local file ~/.sumo.

Next, to run a backup job, you can run:

$ sumologic-export

This will export all your Sumologic data for the past month and dump it into a new directory named exports.

If you'd like to specify a custom date range, you can do so by adding a start and stop date of the form YYYY-MM-DD, for instance:

$ sumologic-export 2014-01-01 2014-06-01

Or, if you'd like, you can just specify a start date, and the exporter will export all logs from the start date till the current day.

$ sumologic-export 2014-01-01

NOTE: Depending on how many logs you have, this process may take a while.

Once the process is finished, you'll have an exports directory populated with gziped JSON files. There will be one JSON file for each day, for instance:

$ ls exports
2014-01-01.json.gz
2014-01-02.json.gz

For full usage information, run sumologic-export -h.

Help

Need help? Can't figure something out? If you think you've found a bug, please open an issue on the GitHub issue tracker.

Otherwise, shoot me an email!

Changelog

v0.0.2: 01-19-2015

- Fixing off-by-one error in pagination logic. This was causing us to NOT
  download the last page of logs :(  Thanks
  [@sumoway](https://github.com/sumoway) for the report!

v0.0.1: 06-25-2014

- First release!  Woo!

sumologic-export's People

Contributors

rdegges 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.