Download the Sumo Logic Live Tail CLI tool.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md Minor format tweaks; added syntax highlighting. Jan 11, 2018

README.md

Sumo Logic Live Tail Command Line Interface (CLI)

Join the chat at https://gitter.im/SumoLogic/livetail-cli

The Live Tail Command Line Interface (CLI) is a standalone application that allows you to start and use a Live Tail session from the command line, similar to tail -f The output is directed to stdout - so you can pipe the output to commands (grep, awk etc)

This feature is documented here.

Installation

Platform specific binaries are provided for CLI.

Simply extract the archive and place the binaries to a location where you have read/write access.

Usage

Like SumoLogic, the Live Tail CLI enables you to tail logs in real time by specifying a filter. It uses accessId and accessKeys that are used with the SumoLogic API for authentication. You could either provide the credentials each time using -i and -k command line options, or enter them once when prompted and they would be saved locally in config.json file in the same directory as the CLI.

The first time you run the CLI, the tool will prompt you to choose your deployment. See Help for the correct endpoint.

Command Line Options

usage: livetail [-h] [-i ACCESSID] [-k ACCESSKEY] [-v] [-c] [filter]

positional arguments:
  filter         Live Tail filter

optional arguments:
  -h, --help     show this help message and exit
  -i ACCESSID    Access ID
  -k ACCESSKEY   Acccess Key
  -v, --version  show program's version number and exit
  -c             clear Live Tail

Examples

Tail all logs from a given Source Host.

./livetail “_sourceHost = localhost”

Tail logs from a sourceCategory, grep for a pattern, write it to a file

./livetail “_sourceCategory = service” | grep -i “rate limit exceeded” > out.txt

Happy Tailing!