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.WriteKeyto 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.ParserNametoregexLineRegexto a regular expression with named capture groups.
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 logs, do not forget to transition into the default streaming behavior to stream live logs to Honeycomb!
Regexes
We use golang’s regexp package, which uses RE2 syntax.Specifying Regexes
Command line: use the--regex.line_regex flag to tell honeytail how to extract data from a log line.
You must provide at least one regex.
You may optionally specify multiple regexes.
Lines will be parsed by the first regex to find a match.
Precedence is based on the order you pass in line_regex, so specify your regexes from most-specific to least-specific.
On the command line, you will need to wrap the regex in quotes.
Regex Syntax
Regexes must contain at least one named capture group. Use the(?P<name>re) syntax for named groups. Example:
Log file
Nested Regex Grouping
Nested groups are supported. For example:A B C” into { outer: "A B C", inner1: "B", inner2: "C" }.
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. Use the--regex.timefield and --regex.time_format flags to help honeytail understand where and how to extract the event’s timestamp.
For example, given a log file like the following:
"local_time" field as the event’s timestamp would look like):
--regex.timefield="local_time" argument tells honeytail to consider the "local_time" value to be the canonical timestamp for the events in the specified file.
The --regex.time_format argument specifies the timestamp format to be used while parsing.
(It understands common strftime formats.)