Data Expectations
Honeycomb expects data with a flat structure. By default, any structure deeper than top level keys will be serialized and a string representation of the content will be used in the field. However, Honeycomb can automatically unpack nested JSON objects and flatten them into unique columns. This is a per-dataset setting, and it is off by default. You must be a team owner to change this setting. If you enable this setting, nested objects will be flattened with new fields and field names created based on the keys. For example,{"outer": {"inner": 42}} would become a field outer.inner with a value of 42.
To tell Honeycomb to automatically unpack JSON objects:
- In the left navigation menu, select Manage Data.
- In the list, locate and select Datasets and select the dataset you want to configure.
- Select the Schema view.
- Enable the Automatically unpack non-OpenTelemetry nested JSON toggle.
- Select your preferred Maximum unpacking depth for your data.
If your objects are deeply-nested, unpacking may result in a very large number of columns in Honeycomb. Consider unpacking only to the level of columns you will find useful. Any objects nested more deeply than the depth you select here will be converted to strings under the last unpacked column.
In particular, if nested structures in your data can be created/added by your users (for example, HTTP headers), consider not unpacking them to that level.
Installation
Download and install the latesthoneytail by running:
- deb-amd64
- deb-arm64
- rpm
- bin-linux-amd64
- bin-linux-arm64
- bin-darwin-amd64
- source
Download the Verify the package.Install the package.The packages install
honeytail_1.10.0_amd64.deb package.honeytail, its config file /etc/honeytail/honeytail.conf,
and some start scripts.
Build honeytail from source if you need it in an unpackaged form or for ad-hoc use.ParserNametojsonWriteKeyto your API key, available from the account pageLogFilesto the path for the log file you want to ingest, or-for stdinDatasetto the name of the dataset you wish to create with this log file.
Launch the Agent
Start up ahoneytail process using upstart or systemd or by launching the process by hand.
This will tail the log file specified in the config and leave the process running as a daemon.
- upstart
- systemd
- manual
Backfilling Archived Logs
To backfill existing data, runhoneytail with --backfill the first time:
If you have chosen to backfill from old JSON logs, do not forget to transition into the default streaming behavior to stream live logs to Honeycomb!
Timestamp Parsing
Honeycomb expects all events to contain a timestamp field; if one is not provided, the server will associate the current time of ingest with the given payload. By default, we look for a few candidate fields based on name ("timestamp", "time") and handle the following time formats:
- RFC3339 (
2006-01-02T15:04:05Z07:00) - RFC3339 with nanoseconds (
2006-01-02T15:04:05.999999999Z07:00) - Unix string representation (
Mon Jan 2 15:04:05 MST 2006) - Ruby string representation (
Mon Jan 02 15:04:05 -0700 2006) - Golang string representation (
2006-01-02 15:04:05.999999999 -0700 MST)
--json.timefield and --json.format flags
to help honeytail understand where and how to extract the event’s timestamp.
For example, given a JSON log file with events like the following:
"server_time" field as the event’s timestamp)
would look something like:
--json.timefield="server_time" argument tells honeytail to consider the "server_time" value
to be the canonical timestamp for the events in the specified file.
The --json.format argument specifies the timestamp format to be used while parsing.
(It understands common strftime formats.)
Ultimately, the above command would would produce events with the fields
(note the times below are represented in UTC; Honeycomb parses time zone information if provided).