cli

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

README

Humio CLI

A CLI for streaming logs and files to Humio.

THIS IS WORK IN PROGRESS

You are welcome to try it out and contribute. Warning: this readme is also WIP.

Usage

$ humio -t <HUMIO_API_TOKEN> /var/log/system.log
$ log stream | humio

You can also store your HUMIO_API_TOKEN as an environment variable. Here is an example for setting it in Bash.

$ echo "export HUMIO_API_TOKEN=<API_TOKEN>" >> ~/.bashrc

By default all logs are sent to your Scratch (Beta Feature) dataspace. You can use the -d flag to specify another dataspace:

$ echo "Hello Humio" | humio -d another-dataspace [...]

@name and @session

All events are will be annotated with @name and @session attributes. @name gives you a way to tag your streams atito easily find them again, e.g.:

$ humio -n work-related /usr/local/share/mysql.conf
@name = "work-related" | groupby(loglevel)

@session is a unique id that is generated for each execution of the humio binary. This allows you to find results for this session and nothing else.

Developer Setup

$ make get
$ make build
Making a new release
$ make dist

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL