Skip to content

Search Logstash / Elasticsearch logs from the command line

Notifications You must be signed in to change notification settings

gocardless/logsearch

Repository files navigation

logsearch

Search Elasticsearch logs from the command line.

Installing

If you're using a Mac, install from the Homebrew tap:

$ brew tap gocardless/taps
$ brew install logsearch

If you're using Linux, download the latest binary from the releases page.

Usage

$ logsearch -h
Usage:
  logsearch [OPTIONS] QUERY

Application Options:
  -e, --elasticsearch-url= URL for the Elasticsearch instance. Alternatively, use ELASTICSEARCH_URL environment variable.
  -f, --follow             Show new data as it becomes available, like tail -f
  -n, --num-results=       Max number of results to return (default: 100)
  -p, --period=            Search time period, e.g. '3 hours', or '1 day' (default: 1 day)
  -V, --version            Show logsearch version
  -m, --message-only       Show message only

Help Options:
  -h, --help               Show this help message