Sha256: 5d9b009bbbad4921f5083c20a812da17d49edc26deedd0b64c94d752f900be40

Contents?: true

Size: 1.84 KB

Versions: 2

Compression:

Stored size: 1.84 KB

Contents

# sumo-search

This library can be used to query Sumo Logic's search API.

## Installation

From the command line:

```shell
$ sudo gem install sumo-search
```

Installing this gem will install a script called `sumo`.
Note that this gem requires a Ruby version of at least 2.0.0.

## Configuration

To use this script, you must supply your Sumo Logic credentials.
The script can read credentials from one of two places; either an environment variable or a configuration file.
The environment variable is `SUMO_CREDS`, and the configuration file is `~/.sumo_creds`.
Whichever you choose, the credentials must be in the following format:

```
username@website:password
```

## Usage

```shell
$ sumo [*options/flags*]
```

This script wraps the [Sumo Search API](https://github.com/SumoLogic/sumo-api-doc/wiki/search-api).
The API only has one endpoint, `/api/v1/logs/search` which searches your logs.

| Command Line Option    | Corresponding Query Parameter | Description                          |
|------------------------|-------------------------------|--------------------------------------|
| -q, --query QUERY      | q                             | The query to search (required)       |
| -f, --from START       | from                          | Begin searching at START (ISO8601)   |
| -t, --to END           | to                            | Finish searching at END (ISO8601)    |
| -z, --time-zone ZONE   | tz                            | The timezone of the search           |
| -c, --config-file FILE | -                             | Use the specified config file        |
| -e, --extract-key KEY  | -                             | Extract the given key from your logs |
| -h, --help             | -                             | Display the help message             |
| -v, --version          | -                             | Display the version                  |

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sumo-search-0.1.1 README.md
sumo-search-0.1.0 README.md