Coder Social home page Coder Social logo

mdusher / humio-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from humio/cli

0.0 0.0 0.0 911 KB

CLI Client for Humio - Stream Logs All Day Long

Home Page: https://humio.com

License: Apache License 2.0

Shell 2.01% Go 97.83% Makefile 0.16%

humio-cli's Introduction

Humio CLI

Build Status Release Status Go Report Card

A CLI for managing and searching in Humio from the command line. The CLI also has limited support for ingesting data, but it is no substitute for a dedicated log shipper like FileBeat.

This repository also contains Humio GoLang API client you can use to build your own tools.

Installation

MacOS

$ brew tap humio/humio
$ brew install humioctl

Linux (via Snapcraft)

$ sudo snap install humioctl

Nix

$ nix-env -i humioctl

Any OS (via Go)

$ go install github.com/humio/cli/cmd/humioctl@latest

Manual installation

Download the latest release archive from the releases page, unpack and enjoy!

Usage

To get started just write:

$ humioctl

and you will be asked to connect to your Humio cluster. To list all commands use:

$ humioctl help

Will print all the different options and commands currently supported.

Sending Logs

$ tail -f /var/log/system.log | humio ingest

# or

$ humioctl ingest --tail=/var/log/system.log

You can have Humio's UI open and tail the newly imported data using the -open flag.

@label and @session

When streaming data into Humio using the ingest command all events will be annotated with @label and @session attributes. @label gives you a way to tag your streams to easily find them again e.g.:

$ humioctl ingest -label=work-related -tail=/var/log/mysql.log
@label = "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.

Profiles and Environment Variables

To make it easier to switch between different Humio clusters, you can configure a profile for each cluster. The configuration file, containing the API token and server address for all profiles will be default be saved in $HOME/.humio/config.yaml.

Adding a profile and making it the new default can be done using:

$ humioctl profiles add my-profile
$ humioctl profiles set-default my-profile

It is also possible to use environment variables, and these will take
precendence over the default profile.

```bash
# Your account API token. You can find your token in Humio's UI under
# 'Your Account' in the account menu.
HUMIO_TOKEN=<token>

# The address of the Humio server. E.g. https://cloud.humio.com/,
# or http://localhost:8080/
HUMIO_ADDRESS=<url>

# If access to the Humio server requires trusting a specific Certificate Authority,
# for validating the certificate, you can specify CA certificate in PEM format.
# You can either point to a file with the certificate or provide it directly.
HUMIO_CA_CERTIFICATE=<ca-certificate>

# If access to the Humio server uses an untrusted certificate and you
# are unable to provide a CA certificate, you can disable TLS certificate verification.
# NB: This should only ever be used on test clusters where you are in full
# control of the involved systems and underlying network.
# Do not use this for prodution use-cases.
HUMIO_INSECURE=<bool>

humio-cli's People

Contributors

alexanderbrandborg avatar anagrius avatar andejens avatar bderrly avatar danielamkaer avatar dependabot[bot] avatar fjerlov-cs avatar floekke avatar jespermbyskov avatar jstroem avatar jswoods avatar kra-ts avatar madsfabriciusschmidt avatar mahlunar avatar martinhs avatar mdusher avatar mwl avatar namm2 avatar peteole avatar pmech avatar rgushchin avatar saaldjormike avatar schleppy avatar schofield avatar skovsboll avatar someword avatar tankbusta 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.