### Install Humio CLI on Linux Source: https://github.com/humio/cli/blob/master/README.md Installs the Humio CLI on Linux using Snapcraft. ```bash sudo snap install humioctl ``` -------------------------------- ### Install Humio CLI via Go Source: https://github.com/humio/cli/blob/master/README.md Installs the Humio CLI using the Go programming language's install command. ```bash go install github.com/humio/cli/cmd/humioctl@latest ``` -------------------------------- ### Install Humio CLI with Nix Source: https://github.com/humio/cli/blob/master/README.md Installs the Humio CLI using Nix package manager. ```bash nix-env -i humioctl ``` -------------------------------- ### Install Humio CLI on MacOS Source: https://github.com/humio/cli/blob/master/README.md Installs the Humio CLI using Homebrew on macOS. ```bash brew tap humio/humio brew install humioctl ``` -------------------------------- ### Run Humio tests locally Source: https://github.com/humio/cli/blob/master/e2e/README.md Run the end-to-end tests against a locally running Humio instance, skipping the setup and teardown of docker containers. This is useful for faster test development cycles. ```shell $ ./run.bash --skip-humio ``` -------------------------------- ### Query Data with Label Source: https://github.com/humio/cli/blob/master/README.md Example of a Humio query that groups data by log level, using a label defined during ingestion. ```java @label = "work-related" | groupby(loglevel) ``` -------------------------------- ### Create Humio Repository from File Source: https://github.com/humio/cli/wiki/Home Use this command to create a new Humio repository using a configuration file. ```bash humio repo create --file= ``` -------------------------------- ### List Humio Repositories Source: https://github.com/humio/cli/wiki/Home Use this command to list all available repositories in Humio. ```bash humio repo list ``` -------------------------------- ### List Humio Views Source: https://github.com/humio/cli/wiki/Home Use this command to list all available views in Humio. ```bash humio view list ``` -------------------------------- ### Run Humio CLI Source: https://github.com/humio/cli/blob/master/README.md Executes the Humio CLI to initiate connection to a Humio cluster. ```bash humioctl ``` -------------------------------- ### Push Humio Repository Configuration Source: https://github.com/humio/cli/wiki/Home Use this command to push repository configuration from a file. It accepts the same arguments as the 'create' command. ```bash humio repo push ([-c] | [--create]) ``` -------------------------------- ### Show Humio View Details Source: https://github.com/humio/cli/wiki/Home Use this command to display details for a specific Humio view. ```bash humio view show ``` -------------------------------- ### Show Humio Repository Details Source: https://github.com/humio/cli/wiki/Home Use this command to display details for a specific Humio repository. ```bash humio repo show ``` -------------------------------- ### Build the CLI Source: https://github.com/humio/cli/blob/master/e2e/README.md Build the humioctl CLI before running tests. This command should be executed from the root of the project. ```shell $ make build ``` -------------------------------- ### Create Humio Repository Source: https://github.com/humio/cli/wiki/Home Use this command to create a new Humio repository. Optional arguments include retention settings and archiving configuration. ```bash humio repo create [--retention-size=] [--retention-days=] [--archiving-enabled=] [--archiving-bucket=] [--archiving-region=] ``` -------------------------------- ### List Humio CLI Commands Source: https://github.com/humio/cli/blob/master/README.md Displays all available commands and options supported by the Humio CLI. ```bash humioctl help ``` -------------------------------- ### List Humio Dashboard Links Source: https://github.com/humio/cli/wiki/Home Use this command to list all dashboard links in Humio. ```bash humio dashboard links list ``` -------------------------------- ### Create Humio User Source: https://github.com/humio/cli/wiki/Home Use this command to create a new user in Humio. Optional arguments allow setting name, country, email, and root privileges. ```bash humio users create [--name=] [--country=] [--email=] [--root=true] ... ``` -------------------------------- ### Update Humio View from File Source: https://github.com/humio/cli/wiki/Home Use this command to update a Humio view using a configuration file. It accepts the same arguments as the 'create' command. ```bash humio view update --file= ([-c] | [--create]) ``` -------------------------------- ### List Humio Users Source: https://github.com/humio/cli/wiki/Home Use this command to list all users in Humio. ```bash humio users list ``` -------------------------------- ### Show Humio User Details Source: https://github.com/humio/cli/wiki/Home Use this command to display details for a specific Humio user. ```bash humio users show ``` -------------------------------- ### List Humio Query Blacklist Source: https://github.com/humio/cli/wiki/Home Use this command to list the query blacklist entries, optionally filtered by repository. ```bash humio query-blacklist list [--repo=] ``` -------------------------------- ### Ingest Logs with Humio CLI Source: https://github.com/humio/cli/blob/master/README.md Streams log data from a file to Humio for ingestion. Use the -open flag to view imported data in the Humio UI. ```bash tail -f /var/log/system.log | humio ingest ``` ```bash humioctl ingest --tail=/var/log/system.log ``` -------------------------------- ### Add Humio Dashboard Link Source: https://github.com/humio/cli/wiki/Home Use this command to add a new dashboard link in Humio. ```bash humio dashboard links add ``` -------------------------------- ### List Humio Parsers Source: https://github.com/humio/cli/wiki/Home Use this command to list parsers within a specific Humio repository. ```bash humio parsers list ``` -------------------------------- ### Push Humio Parser Source: https://github.com/humio/cli/wiki/Home Use this command to push a parser to a Humio repository from a file, URL, or GitHub path. Supports updating existing parsers. ```bash humio parsers push ( | | ) [--name=] ([-u] | [--update]) ``` -------------------------------- ### Push Humio Dashboard Source: https://github.com/humio/cli/wiki/Home Use this command to push a dashboard configuration from a file, URL, or GitHub path. Supports updating existing dashboards. ```bash humio dashboard push ( | | ) [--name=] ([-u] | [--update]) ``` -------------------------------- ### Add and Set Humio CLI Profile Source: https://github.com/humio/cli/blob/master/README.md Adds a new profile for a Humio cluster and sets it as the default. Configuration is stored in $HOME/.humio/config.yaml. ```bash humioctl profiles add my-profile humioctl profiles set-default my-profile ``` -------------------------------- ### Update Humio Repository Source: https://github.com/humio/cli/wiki/Home Use this command to update an existing Humio repository. It accepts the same arguments as the 'create' command. ```bash humio repo update ([-c] | [--create]) ``` -------------------------------- ### Add Humio Query Blacklist Entry Source: https://github.com/humio/cli/wiki/Home Use this command to add a pattern to the Humio query blacklist. Specify type as 'exact' or 'regex'. ```bash humio query-blacklist add "" [--repo=] [--type=exact|regex] ``` -------------------------------- ### Humio CLI Environment Variables Source: https://github.com/humio/cli/blob/master/README.md Configures Humio CLI connection details using environment variables, which take precedence over profile settings. ```bash # Your account API token. You can find your token in Humio's UI under # 'Your Account' in the account menu. HUMIO_TOKEN= # The address of the Humio server. E.g. https://cloud.humio.com/, # or http://localhost:8080/ HUMIO_ADDRESS= # 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= # 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= ``` -------------------------------- ### Run Humio tests in Docker Source: https://github.com/humio/cli/blob/master/e2e/README.md Execute the end-to-end tests against a Humio docker container. This is the default test execution mode. ```shell $ ./run.bash ``` -------------------------------- ### Filebeat Configuration for Ruby Logs Source: https://github.com/humio/cli/blob/master/e2e/packages/invalid/README.md This Filebeat configuration is used to send Ruby log files to Humio. Ensure the paths and Humio server details are correctly set. ```yaml filebeat.inputs: - paths: - $PATH_TO_LOG_FILES/example.log - $PATH_TO_LOG_FILES/stderr.log - $PATH_TO_LOG_FILES/stdout.log encoding: utf-8 queue.mem: events: 8000 flush.min_events: 100 flush.timeout: 1s output: elasticsearch: hosts: ["$HUMIO_SERVER/api/v1/ingest/elastic-bulk"] username: anything password: $INGEST_TOKEN compression_level: 5 bulk_max_size: 200 worker: 5 ``` -------------------------------- ### Pull Humio Dashboard Source: https://github.com/humio/cli/wiki/Home Use this command to pull a dashboard configuration for a specific view and name. ```bash humio dashboard pull ``` -------------------------------- ### Add Humio Membership Source: https://github.com/humio/cli/wiki/Home Use this command to add a user to a view in Humio. Optional arguments control admin privileges and deletion allowance. ```bash humio membership add [--admin-users=] [--allow-deletion=] ``` -------------------------------- ### Pull Humio Parser Source: https://github.com/humio/cli/wiki/Home Use this command to pull a parser from a URL or GitHub path to a local output path. Allows specifying the parser name. ```bash humio parsers pull ( | ) [--name=] ``` -------------------------------- ### Show Humio Status Source: https://github.com/humio/cli/wiki/Home Use this command to check the status of Humio, optionally for a specific node. ```bash humio status [node] ``` -------------------------------- ### Rename Humio View Source: https://github.com/humio/cli/wiki/Home Use this command to rename an existing Humio view. ```bash humio view rename ``` -------------------------------- ### Update Humio User Source: https://github.com/humio/cli/wiki/Home Use this command to update an existing Humio user. It accepts the same arguments as the 'create' command. ```bash humio users update ([-c] | [--create]) ... ``` -------------------------------- ### Ingest Logs with Label Source: https://github.com/humio/cli/blob/master/README.md Ingests logs into Humio and annotates them with a specified label for easier searching. The label helps tag streams for retrieval. ```bash humioctl ingest -label=work-related -tail=/var/log/mysql.log ``` -------------------------------- ### Rename Humio Repository Source: https://github.com/humio/cli/wiki/Home Use this command to rename an existing Humio repository. ```bash humio repo rename ``` -------------------------------- ### Ruby Application for Log Generation Source: https://github.com/humio/cli/blob/master/e2e/packages/invalid/README.md This Ruby script generates various log messages (info, warn, error) and simulates exceptions. It redirects stdout and stderr to files and uses the standard Ruby Logger. ```ruby require "logger" logger = Logger.new File.new('example.log', 'w') $stderr = File.new("stderr.log", "w") $stdout = File.new("stdout.log", "w") def throwException(x, logger) deepStacktrace(x, logger) end def deepStacktrace(x, logger) raise ArgumentError, 'Argument is not numeric' unless x.is_a? Numeric rescue ArgumentError => error puts error.backtrace end # Generate some log output i = 1 while(true) do logger.info("I am info. Controller: MySuperController User: Anders") if i % 2 == 0 then logger.warn("I am a warning. Foo: Bar") end if i % 3 == 0 then logger.error("I am an error. Controller: MySuperController User: Peter") end if i % 100 == 0 then throwException("dd", logger) end sleep 0.001 i+=1 end ``` -------------------------------- ### Remove Humio Repository Source: https://github.com/humio/cli/wiki/Home Use this command to remove a Humio repository. ```bash humio repo rm ``` -------------------------------- ### Remove Humio View Source: https://github.com/humio/cli/wiki/Home Use this command to remove a Humio view. ```bash humio view rm ``` -------------------------------- ### Update Humio Membership Source: https://github.com/humio/cli/wiki/Home Use this command to update an existing Humio membership. It accepts the same arguments as the 'add' command. ```bash humio membership update ([-c] | [--create]) ``` -------------------------------- ### Remove Humio Query Blacklist Entry Source: https://github.com/humio/cli/wiki/Home Use this command to remove a query blacklist entry by its ID. ```bash humio query-blacklist rm ``` -------------------------------- ### Remove Humio Dashboard Source: https://github.com/humio/cli/wiki/Home Use this command to remove a dashboard for a specific view and name. ```bash humio dashboard rm ``` -------------------------------- ### Remove Humio Dashboard Link Source: https://github.com/humio/cli/wiki/Home Use this command to remove a dashboard link from Humio. ```bash humio dashboard links rm ``` -------------------------------- ### Remove Humio Membership Source: https://github.com/humio/cli/wiki/Home Use this command to remove a user from a view in Humio. ```bash humio membership rm ``` -------------------------------- ### Remove Humio Parser Source: https://github.com/humio/cli/wiki/Home Use this command to remove a parser from a Humio repository. ```bash humio parsers rm ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.