Tells a (logged) AWS ElasticSearch tale.
Provides tail
like interface for accessing log information stored in ElasticSearch.
$ tael -f ioexception
ioexception
could be any valid ElasticSearch query. Output can be controlled by specifying:
-j
Outputs log entries as JSON (potentially to pipe intojq
or other commands)-l
Allows specification of the output format using Go's mustach-like templating. For example, to output just the entry IDs you could use:tael -f -l "{{.Id}}" ...
usage: tael [<flags>] [<filter>...]
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--host=HOST aws elasticsearch url
-f, --follow follow log
--index="*" elasticsearch index
-n, --number=10 number of results to retrieve
-j, --json output as json
-l, --layout=LAYOUT custom templated output
--query="*" elasticsearch query
Args:
[<filter>] field filter, name=value
tael
expects your ElasticSearch indices contain the following fields:
@timestamp
: the time of the log entrymessage
: the log messagelevel_name
: log level, e.g. info, warn, error etc.
Additionally, tael
expects log messages from Docker containers and so will also extract:
image_name
container_name
Please see LICENSE