DTail is a distributed DevOps tool for tailing, grepping, catting logs and other text files on many remote machines at once.
  • Go 92%
  • Shell 4.9%
  • C 1.7%
  • Makefile 1.3%
  • Dockerfile 0.1%
Find a file
Paul Buetow d89b9e6760
Add SSH agent key selection and fix MapReduce outfile handling
This commit adds two major features and fixes:

1. SSH Agent Key Selection:
   - Add --agentKeyIndex flag to select specific SSH agent key (0-based)
   - Solves "too many authentication failures" with multiple SSH keys
   - Default -1 uses all keys (backwards compatible)
   - Available in dtail, dcat, dgrep, dmap commands

2. MapReduce Outfile Fixes:
   - CSV files now written at every interval, not just on exit
   - Proper signal handling (SIGTERM/SIGINT) with graceful shutdown
   - 5-second grace period for cleanup before force exit
   - Fixes issue where outfile remained as .tmp during execution

Usage:
  dtail --servers host --agentKeyIndex 0 --query '...' outfile results.csv

This is particularly useful with YubiKey/hardware tokens where many
keys are loaded in the SSH agent, and for monitoring MapReduce results
in real-time as they're computed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-03 17:09:34 +02:00
.github Add GitHub dependabot configuration 2022-06-14 13:11:21 +03:00
benchmarks feat: add Profile-Guided Optimization (PGO) support 2025-07-04 15:35:16 +03:00
cmd Add SSH agent key selection and fix MapReduce outfile handling 2026-02-03 17:09:34 +02:00
doc deprecated 2026-02-01 20:30:42 +02:00
docker fix: update profiling scripts to use correct path for generate_profile_data.go 2025-06-26 21:45:11 +03:00
docs fix: resolve package conflicts and update documentation 2025-06-26 20:57:53 +03:00
examples refactor: change turbo boost to be enabled by default 2025-07-04 10:57:22 +03:00
integrationtests fix: restore accidentally deleted mapr_testdata.log test file 2025-07-04 12:06:01 +03:00
internal Add SSH agent key selection and fix MapReduce outfile handling 2026-02-03 17:09:34 +02:00
.gitignore ignore .serena 2026-01-23 23:44:35 +02:00
_config.yml Set theme jekyll-theme-modernist 2021-05-27 10:26:27 +01:00
AGENTS.md add AGENTS.md 2026-01-29 20:33:12 +02:00
CLAUDE.md add AGENTS.md 2026-01-29 20:33:12 +02: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 fix: implement thread-safe turbo mode for MapReduce operations 2025-07-03 16:13:26 +03:00
go.sum fix: implement thread-safe turbo mode for MapReduce operations 2025-07-03 16:13:26 +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 egrep is obsolete 2026-01-23 23:43:28 +02:00
README.md deprecated 2026-02-01 20:30:42 +02:00
TOOD.md feat: add Profile-Guided Optimization (PGO) support 2025-07-04 15:35:16 +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

More

Credits