Command-Line Interface

Humio can be controlled via a command-line interface (CLI), called humioctl; short for “Humio Control”.

The command takes sub-commands such as search and cluster to inspect and administer cluster properties or search and send data to Humio.

To view a list of the available commands at any time, use humioctl help to get a summary of the available commands:

shell
humioctl help

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 auto-completions 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.

humioctl returns a non-zero status code in the event of an error.

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

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

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. See Ingesting Data for a list of available ingest tools.

Installation

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

  • MacOS

shell
brew tap humio/humio
brew install humioctl
  • Linux (via Snapcraft)

shell
snap install humioctl
  • Nix

shell
nix-env -i humioctl
  • Any OS (via Go)

shell
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