logcat

command module
v0.0.0-...-a728e91 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

README

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.

Documentation

Overview

logcat

Outputs syslog-formatted logs from a Logstash ES-backed index.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL