|
|
||
|---|---|---|
| .. | ||
| README.md | ||
| tail.go | ||
| tail_test.go | ||
README.md
tail Input Plugin
The tail plugin "tails" a logfile and parses each log message.
By default, the tail plugin acts like the following unix tail command:
tail --follow=name --lines=0 --retry myfile.log
--follow=namemeans that it will follow the name of the given file, so that it will be compatible with log-rotated files.--lines=0means that it will start at the end of the file (unless thefrom_beginningoption is set).--retrymeans it will retry on inaccessible files.
see http://man7.org/linux/man-pages/man1/tail.1.html for more details.
The plugin expects messages in one of the Telegraf Input Data Formats.
Configuration:
# Stream a log file, like the tail -f command
[[inputs.tail]]
# SampleConfig