Skip to content
Snippets Groups Projects
Select Git revision
  • lintian-fixes
  • master default protected
2 results

logcat

  • Clone with SSH
  • Clone with HTTPS
  • Forked from ai3 / tools / logcat
    12 commits behind the upstream repository.
    ale's avatar
    ale authored
    Update module github.com/olivere/elastic/v7 to v7.0.26
    
    See merge request ai3/tools/logcat!7
    10b87618
    History

    logcat

    Dumps syslog-formatted entries from an Elasticsearch-backed Logstash index.

    It uses Elasticsearch's scroll API.

    Installation

    Simply running:

    $ go get git.autistici.org/ai3/tools/logcat

    will install the logcat binary in $GOPATH/bin.

    Usage

    The logcat tool provides a few command-line switches to simplify creating the final ES query:

    • --from and --to allow you to select a time range (by default the last hour of logs will be selected)
    • --facility filters results for a specific syslog facility ("mail", "kernel", etc).

    Any other arguments on the command line will be parsed as a query string, so you can do things like extracting logs for a specific program:

    $ logcat --facility mail 'program:"postfix/smtpd"'

    and other arbitrary queries using the Elasticsearch query string syntax.