Logstash is an established open source tool for collecting logs, parsing them, and outputting them to other systems.

You can use Logstash alongside Humio to process and analyze logs together. In this scenario, you use Logstash as the log collection and parsing agent and instruct it to send the data to Humio.

Humio supports the Elasticsearch bulk insertion API. Just point the Elastic outputter at Humio.

The benefit of this approach is that you can take advantage of the extensible architecture of Logstash to parse many kinds of data:

  • You can install one of the many available plugins that can parse many well-known data formats.
  • You can use the Grok language to build custom parsers for unusual data formats. Grok has many built-in patterns to help parse your data.


To download Logstash visit the Logstash downloads page.

You can find the complete documentation for Logstash at the Logstash website.


Because Humio supports parts of the ElasticSearch insertion API, you can use the built-in elasticsearch output in the Logstash configuration.

The following example shows a very simple Logstash configuration that sends data to Humio:

    command => "date"
    interval => "5"
    hosts => ["$YOUR_HUMIO_URL/api/v1/ingest/elastic-bulk"]
    user => my-organization
    password => "$INGEST_TOKEN"

  • $YOUR_HUMIO_URL — is the base URL of your Humio server (https://cloud.humio.com:443 or http://localhost:8080)
  • $INGEST_TOKEN — is the ingest token for your repository, (a string such as fS6Kdlb0clqe0UwPcc4slvNFP3Qn1COzG9DEVLw7v0Ii).

Logstash uses 9200 as the default port if no port is specified. So if Humio is listening on the default ports 80 or 443 these ports should be explicitly put in $YOUR_HUMIO_URL.

In the above example, Logstash calls the Linux date command every five seconds. It passes the output from this command to Humio.

Field mappings

When you use the ElasticSearch output, Logstash outputs JSON objects. The JSON for an event sent to Humio with the above configuration looks like this:

  "@timestamp": "2016-08-25T08:34:37.041Z",
  "message": "Thu Aug 25 10:34:37 CEST 2016\n",
  "command": "date"

Humio maps each JSON object into an Event. Each field in the JSON object becomes a field in the Humio Event.

@timestamp is a special field in the Elastic protocol. It must be present, and contain the timestamp in ISO 8601 format (yyyy-MM-dd'THH:mm:ss.SSSZ). It is possible to specify the timezone (like +00:02) in the timestamp. Specify
the time zone if you want Humio to save this information. Logstash adds the @timestamp field automatically.

Depending on the configuration the timestamp can be the time at which Logstash handles the event, or the actual timestamp in the data. If the timestamp is present in the data you can configure logstash to parse it, for example, by using the date filter. Another option is to handle parsing the timestamp in Humio by connecting a parser to the ingest token.

Adding Parsers in Humio

Humio can do further parsing/transformation of the data it receives by connecting a parser to the ingest token. For more information on parsers, see parsing.

Dropping fields

Logstash often adds fields like host and @version to events. You can remove these fields using a filter and the drop_field function in Logstash.