DTail is a distributed DevOps tool for tailing, grepping, catting logs and other text files on many remote machines at once.
  • Go 95.7%
  • Shell 2.8%
  • C 0.8%
  • Makefile 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Paul Buetow 3004a7100e docs: DTail fork — documentation, agent guide, example configs
Squashed development of the documentation and example configuration:

- AGENTS.md / CLAUDE.md: repository guide describing build/test/benchmark/PGO
  workflows and the single default read/output path (formerly "turbo").
- doc/ and docs/: query-language reference, log formats, auth-key fast reconnect,
  journal source reads, performance analyses (dated point-in-time records kept
  under historical-note disclaimers), and the turbo-vs-normal benchmark report
  with its result CSVs.
- README.md updates; examples/ config + JSON schema aligned with the current
  Output* server tuning fields (the removed TurboBoost* keys dropped).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 23:52:52 +03:00
.github Add GitHub dependabot configuration 2022-06-14 13:11:21 +03:00
benchmarks build: DTail fork — benchmarks, PGO tooling, Makefile, docker 2026-07-22 23:52:43 +03:00
cmd feat: DTail fork — server/client feature development 2026-07-22 23:51:18 +03:00
doc docs: DTail fork — documentation, agent guide, example configs 2026-07-22 23:52:52 +03:00
docker build: DTail fork — benchmarks, PGO tooling, Makefile, docker 2026-07-22 23:52:43 +03:00
docs docs: DTail fork — documentation, agent guide, example configs 2026-07-22 23:52:52 +03:00
examples docs: DTail fork — documentation, agent guide, example configs 2026-07-22 23:52:52 +03:00
integrationtests test: DTail fork — integration test suite and fixtures 2026-07-22 23:51:28 +03:00
internal feat: DTail fork — server/client feature development 2026-07-22 23:51:18 +03:00
.gitignore build: DTail fork — benchmarks, PGO tooling, Makefile, docker 2026-07-22 23:52:43 +03:00
_config.yml Set theme jekyll-theme-modernist 2021-05-27 10:26:27 +01:00
AGENTS.md docs: DTail fork — documentation, agent guide, example configs 2026-07-22 23:52:52 +03:00
CLAUDE.md docs: DTail fork — documentation, agent guide, example configs 2026-07-22 23:52:52 +03:00
CNAME add CNAME file for github page 2021-05-27 16:39:27 +01:00
CODE_OF_CONDUCT.md Release of DTail v1.0.0 2020-01-09 20:30:15 +00:00
CONTRIBUTING.md Release of DTail v1.0.0 2020-01-09 20:30:15 +00:00
go.mod feat: DTail fork — server/client feature development 2026-07-22 23:51:18 +03:00
go.sum feat: DTail fork — server/client feature development 2026-07-22 23:51:18 +03:00
inventory.yaml Update dependencies 2023-04-27 14:55:37 +03:00
LICENSE Release of DTail v1.0.0 2020-01-09 20:30:15 +00:00
LICENSE.DataDog.zstd add separate licenses md 2020-12-28 10:25:37 +00:00
Makefile build: DTail fork — benchmarks, PGO tooling, Makefile, docker 2026-07-22 23:52:43 +03:00
README.md docs: DTail fork — documentation, agent guide, example configs 2026-07-22 23:52:52 +03:00

DTail

DTail

License Go Report Card Hits-of-Code GitHub issues GitHub forks GitHub stars

DTail (a distributed tail program) is a DevOps tool for engineers programmed in Google Go for following (tailing), catting and grepping (including gzip and zstd decompression support) log files on many machines concurrently. An advanced feature of DTail is to execute distributed MapReduce aggregations across many devices.

For secure authorization and transport encryption, the SSH protocol is used. Furthermore, DTail respects the UNIX file system permission model (traditional on all Linux/UNIX variants and also ACLs on Linux based operating systems).

The DTail binary operates in either client or server mode. The DTail server must be installed on all server boxes involved. The DTail client (possibly running on a regular Laptop) is used interactively to connect to the servers concurrently. That currently scales to multiple thousands of servers per client. Furthermore, DTail can be operated in a serverless mode too. Read more about it in the documentation.

DTail

If you like what you see look here for more examples! You can also read through the DTail Mimecast Engineering Blog Post.

Installation and Usage

Interactive Query Reload

dtail, dgrep, dcat, and dmap accept --interactive-query to keep the current run open and listen for control commands on the controlling TTY.

Available control commands:

  • :reload <flags> apply a new workload by reusing the current session when the active servers support it
  • :show print the current interactive state, including capability counts
  • :help print the interactive command help text
  • :quit stop the interactive session

Reload flags are mode-specific:

  • dtail and dgrep: --grep/--regex, --before, --after, --max, --invert, plus shared flags such as --files, --plain, --quiet, and --timeout
  • dmap, and query-driven dtail: --query plus the shared flags above
  • dcat: shared flags such as --files, --plain, --quiet, and --timeout

Examples:

dtail --servers app01 --files /var/log/app.log --grep ERROR --interactive-query
# then type:
:reload --grep WARN

dgrep --servers app01 --files /var/log/app.log --grep ERROR --interactive-query
# then type:
:reload --grep WARN --before 2 --after 3

dmap --servers app01 --files /var/log/app.log \
  --query 'from STATS select count($line) group by hostname' \
  --interactive-query
# then type:
:reload --query "from STATS select count($line),avg(latency) group by hostname"

Compatibility and session reuse:

  • On startup, an interactive client first tries SESSION START when the remote side advertises the query-update-v1 capability
  • If a server is older or does not advertise that capability, startup falls back to the legacy command stream automatically, so mixed-version client/server combinations still run the original workload normally
  • Live :reload updates require every active server to advertise query-update-v1; otherwise the reload is rejected and the current workload keeps running unchanged
  • On capable servers, DTail reuses the existing SSH session and sends SESSION UPDATE messages instead of reconnecting
  • Every successful reload advances a generation boundary; late output from the previous workload is dropped so stale matches do not leak into the new result stream

Auth-Key Fast Reconnect

DTail supports an optional SSH auth optimization for repeated reconnects. After a normal authenticated SSH session is established, the client can register a local public key with dserver using an AUTHKEY command. The server stores this key in memory only and checks it before authorized_keys on subsequent connections.

This reduces repeated hardware-token signing (for example YubiKey-backed SSH agent keys) while keeping transparent fallback to normal SSH authentication.

Client options:

  • --auth-key-path path to the private key to offer first and register (default: ~/.ssh/id_rsa)
  • --no-auth-key disable auth-key registration/fast-path and use normal SSH behavior only

Server configuration (dtail.json):

{
  "Server": {
    "AuthKeyEnabled": true,
    "AuthKeyTTLSeconds": 86400,
    "AuthKeyMaxPerUser": 5
  }
}

Security notes:

  • Registered keys are stored in memory only (no disk persistence)
  • Registration is accepted only over an already-authenticated session
  • TTL expiry and per-user key limits bound key lifetime and memory growth
  • If fast-path auth is unavailable (restart/expiry/mismatch), DTail falls back to normal SSH auth automatically

More

Credits