Command-Line Interface

Humio can be controlled via a very easy to use command-line interface (CLI), called humioctl short for “Humio Control”. This application takes subcommand such as search and cluster to inspect and administer cluster properties or search and send data to Humio.

The humioctl is a well-behaved command line application. That means that in error cases, it returns non-zero exit status codes making it well suited for scripting. It also responds to -h and --help like you would expect.

To view a list of the available commands at any time, just run humioctl with no arguments:

humioctl help

To stream the content of "/var/log/system.log" data to Humio:

  $ tail -f /var/log/system.log | humioctl ingest -o

Common Management Commands:
  users <subcommand>
  parsers <subcommand>
  views <subcommand>
        status

Usage:
  humioctl [subcommand] [flags] [arguments]
  humioctl [command]

Available Commands:
  alerts        Manage alerts
  cluster       Manage cluster
  completion    Generate autocompletions script for the specified shell (bash or zsh)
  health        Health
  help          Help about any command
  ingest        Send data to Humio.
  ingest-tokens Manage ingest tokens
  license       Manage the Humio license [Root Only]
  actions       Manage actions
  packages      [BETA] Manage packages
  parsers       Manage parsers
  profiles      List and manage configuration profiles.
  repos         Manage repositories
  search        Search
  status        Shows general status information
  users         Manage users [Root Only]
  views         Manage views

Flags:
  -a, --address string               The HTTP address of the Humio cluster. Overrides the value in your config file.
      --ca-certificate-file string   File path to a file containing the CA certificate in PEM format. Overrides the value in your config file.
  -c, --config string                Config file (default is $HOME/.humio/config.yaml)
  -h, --help                         help for humioctl
      --insecure                     By default, all encrypted connections will verify that the hostname in the TLS certificate matches the name from the URL. Set this to true to ignore hostname validation.
  -u, --profile string               Name of the config profile to use
  -t, --token string                 The API token to user when talking to Humio. Overrides the value in your config file.
      --token-file string            File path to a file containing the API token. Overrides the value in your config file and the value of --token.
  -v, --version                      Print the client version

Use "humioctl [command] --help" for more information about a command.

It is important to note that while humioctl has some support for sending data to Humio, it should not be used as the primary way to ship logs to Humio. You should use a datashipper like for example Vector or Filebeat.

Getting Started

Simply download the CLI using one of the options below, and run humioctl. The application will guide you in setting up your environment.

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 get github.com/humio/cli/cmd/humioctl

Other (via Go)

$ go get github.com/humio/cli/cmd/humioctl

Open Source

The CLI is open source and freely available from Github. Contributions and suggestions are very welcome.

Humio CLI Github Repository