lstail


Namelstail JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/eht16/lstail/
SummaryLogstash command line query tool, a bit like tail for Logstash/ElasticSearch
upload_time2023-01-14 11:59:53
maintainer
docs_urlNone
authorEnrico Tröger
requires_python>=3.9
licenseMIT
keywords logging logs logstash query tail log-viewer cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Lstail
======

[![PyPI](https://img.shields.io/pypi/v/lstail.svg)](https://pypi.org/project/lstail/)
[![Documentation Status](https://readthedocs.org/projects/lstail/badge/?version=latest)](https://lstail.org/)
[![Python Versions](https://img.shields.io/pypi/pyversions/lstail.svg)](https://pypi.org/project/lstail/)
[![License](https://img.shields.io/pypi/l/lstail.svg)](https://pypi.org/project/lstail/)


A command line tool to query log events from ElasticSearch,
a bit like tail for Logstash/ElasticSearch.

Lstail queries ElasticSearch for log events and displays
them on the terminal. Saved Searches from Kibana can be used
for quick access to filters and prepared column configuration.
For more details and usage examples please see the
documentation at https://lstail.org/.


Features
--------

  * Follow mode like in `tail -f`
  * CSV output / export
  * Can read Saved Searches from ElasticSearch and use their
    filters and column setup
  * Flexible configurable output of columns, colors and padding
  * Can be proxied through Kibana if not direct ElasticSearch connection is possible
  * Works with ElasticSearch 2.x - 7.x
  * Made with Python and love

![lstail usage demonstration](docs/lstail-demo.svg)


Installation
------------

Lstail requires Python 3.9 or newer.
The easiest method is to install directly from pypi using pip:

    pip install lstail


If you prefer, you can download lstail and install it
directly from source:

    python setup.py install


Get the Source
--------------

The source code is available at https://github.com/eht16/lstail/.


Setup
-----

Before using Lstail, you need to create a config file called `lstail.conf`.
Lstail will search for `lstail.conf` in the following locations (in that order):

  - /etc/lstail.conf
  - ~/.config/lstail.conf
  - lstail.conf (in current working directory)

Alternatively, you can specify the name of the config file to be read
using the `--config` command line parameter.

An example config file can be found in the sources or online
at https://raw.githubusercontent.com/eht16/lstail/main/lstail-example.conf.
The important part to modify in the config file is the `server` section
which must be edited to point to your ElasticSearch instance to query
data from.

For details on all configuration options, please see the documentation:
https://lstail.org/.


Usage
-----

Display events (from the configured index pattern) since ten minutes:

    lstail -r 10m

Display the last 20 events (from the configured index pattern):

    lstail -n 20

Display all events matching the given query:

    lstail -q 'host: google.com'

List Saved Searches from Kibana:

    lstail -l

Display and follow events using the Saved Search "Syslog" (use Ctrl-C to interrupt):

    lstail -s Syslog -f

Overwrite search query for Saved Search "Syslog" (i.e. ignore the query stored
in the Saved Search but use the configured columns):

    lstail -s Syslog -q program:cron


Command line options
--------------------

    usage: lstail [-h] [-V] [-d] [-v] [-c FILE] [-f] [-l] [-H] [--csv]
                  [-n NUM] [-q QUERY] [-r RANGE] [-s NAME] [--select-saved-search]

    optional arguments:
      -h, --help            show this help message and exit
      -V, --version         show version and exit (default: False)
      -d, --debug           enable tracebacks (default: False)
      -v, --verbose         Show own log messages (default: False)
      -c FILE, --config FILE
                            configuration file path (default: None)
      -f, --follow          Constantly fetch new data from ElasticSearch (default: False)
      -l, --list-saved-searches
                            List all saved searches from Kibana (default: False)
      -H, --no-header       Do not print header line before the output (default: False)
      --csv                 Use CSV (comma separated) output (default: False)
      -n NUM, --lines NUM   Output the last NUM lines, instead of the last 10 (default: None)
      -q QUERY, --query QUERY
                            Set/Overwrite the search query (use Lucene query syntax) (default: None)
      -r RANGE, --range RANGE
                            Query events from the last RANGE minutes(m)/hours(h)/days(d) (default: None)
      -s NAME, --saved-search NAME
                            Saved search title as stored in Kibana ("-" to select from a list) (default: None)
      --select-saved-search
                            Interactively select a saved search from a list (default: False)


Contributing
------------

Found a bug or got a feature request? Please report it at
https://github.com/eht16/lstail/issues.


Author
------

Enrico Tröger <enrico.troeger@uvena.de>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/eht16/lstail/",
    "name": "lstail",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "logging logs logstash query tail log-viewer cli",
    "author": "Enrico Tr\u00f6ger",
    "author_email": "enrico.troeger@uvena.de",
    "download_url": "https://files.pythonhosted.org/packages/3f/7c/196b075d8f8de17245d22dca398c77cf9de71d21f17662352ecdd763d5ef/lstail-1.2.0.tar.gz",
    "platform": null,
    "description": "Lstail\n======\n\n[![PyPI](https://img.shields.io/pypi/v/lstail.svg)](https://pypi.org/project/lstail/)\n[![Documentation Status](https://readthedocs.org/projects/lstail/badge/?version=latest)](https://lstail.org/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/lstail.svg)](https://pypi.org/project/lstail/)\n[![License](https://img.shields.io/pypi/l/lstail.svg)](https://pypi.org/project/lstail/)\n\n\nA command line tool to query log events from ElasticSearch,\na bit like tail for Logstash/ElasticSearch.\n\nLstail queries ElasticSearch for log events and displays\nthem on the terminal. Saved Searches from Kibana can be used\nfor quick access to filters and prepared column configuration.\nFor more details and usage examples please see the\ndocumentation at https://lstail.org/.\n\n\nFeatures\n--------\n\n  * Follow mode like in `tail -f`\n  * CSV output / export\n  * Can read Saved Searches from ElasticSearch and use their\n    filters and column setup\n  * Flexible configurable output of columns, colors and padding\n  * Can be proxied through Kibana if not direct ElasticSearch connection is possible\n  * Works with ElasticSearch 2.x - 7.x\n  * Made with Python and love\n\n![lstail usage demonstration](docs/lstail-demo.svg)\n\n\nInstallation\n------------\n\nLstail requires Python 3.9 or newer.\nThe easiest method is to install directly from pypi using pip:\n\n    pip install lstail\n\n\nIf you prefer, you can download lstail and install it\ndirectly from source:\n\n    python setup.py install\n\n\nGet the Source\n--------------\n\nThe source code is available at https://github.com/eht16/lstail/.\n\n\nSetup\n-----\n\nBefore using Lstail, you need to create a config file called `lstail.conf`.\nLstail will search for `lstail.conf` in the following locations (in that order):\n\n  - /etc/lstail.conf\n  - ~/.config/lstail.conf\n  - lstail.conf (in current working directory)\n\nAlternatively, you can specify the name of the config file to be read\nusing the `--config` command line parameter.\n\nAn example config file can be found in the sources or online\nat https://raw.githubusercontent.com/eht16/lstail/main/lstail-example.conf.\nThe important part to modify in the config file is the `server` section\nwhich must be edited to point to your ElasticSearch instance to query\ndata from.\n\nFor details on all configuration options, please see the documentation:\nhttps://lstail.org/.\n\n\nUsage\n-----\n\nDisplay events (from the configured index pattern) since ten minutes:\n\n    lstail -r 10m\n\nDisplay the last 20 events (from the configured index pattern):\n\n    lstail -n 20\n\nDisplay all events matching the given query:\n\n    lstail -q 'host: google.com'\n\nList Saved Searches from Kibana:\n\n    lstail -l\n\nDisplay and follow events using the Saved Search \"Syslog\" (use Ctrl-C to interrupt):\n\n    lstail -s Syslog -f\n\nOverwrite search query for Saved Search \"Syslog\" (i.e. ignore the query stored\nin the Saved Search but use the configured columns):\n\n    lstail -s Syslog -q program:cron\n\n\nCommand line options\n--------------------\n\n    usage: lstail [-h] [-V] [-d] [-v] [-c FILE] [-f] [-l] [-H] [--csv]\n                  [-n NUM] [-q QUERY] [-r RANGE] [-s NAME] [--select-saved-search]\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -V, --version         show version and exit (default: False)\n      -d, --debug           enable tracebacks (default: False)\n      -v, --verbose         Show own log messages (default: False)\n      -c FILE, --config FILE\n                            configuration file path (default: None)\n      -f, --follow          Constantly fetch new data from ElasticSearch (default: False)\n      -l, --list-saved-searches\n                            List all saved searches from Kibana (default: False)\n      -H, --no-header       Do not print header line before the output (default: False)\n      --csv                 Use CSV (comma separated) output (default: False)\n      -n NUM, --lines NUM   Output the last NUM lines, instead of the last 10 (default: None)\n      -q QUERY, --query QUERY\n                            Set/Overwrite the search query (use Lucene query syntax) (default: None)\n      -r RANGE, --range RANGE\n                            Query events from the last RANGE minutes(m)/hours(h)/days(d) (default: None)\n      -s NAME, --saved-search NAME\n                            Saved search title as stored in Kibana (\"-\" to select from a list) (default: None)\n      --select-saved-search\n                            Interactively select a saved search from a list (default: False)\n\n\nContributing\n------------\n\nFound a bug or got a feature request? Please report it at\nhttps://github.com/eht16/lstail/issues.\n\n\nAuthor\n------\n\nEnrico Tr\u00f6ger <enrico.troeger@uvena.de>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Logstash command line query tool, a bit like tail for Logstash/ElasticSearch",
    "version": "1.2.0",
    "split_keywords": [
        "logging",
        "logs",
        "logstash",
        "query",
        "tail",
        "log-viewer",
        "cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8085eba2c0d64eaf8b88b61ce1b62b45f59a9a3fb0617141987c2427cefb7087",
                "md5": "da5ce7d61c6d344775cadbaff54a6398",
                "sha256": "e37c7c9e539f8efdba4ab9a868bd6766719e3a93b43950f5228eeb9eb8e31300"
            },
            "downloads": -1,
            "filename": "lstail-1.2.0-py3-none-any.whl",
            "has_sig": true,
            "md5_digest": "da5ce7d61c6d344775cadbaff54a6398",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 39933,
            "upload_time": "2023-01-14T11:59:51",
            "upload_time_iso_8601": "2023-01-14T11:59:51.235358Z",
            "url": "https://files.pythonhosted.org/packages/80/85/eba2c0d64eaf8b88b61ce1b62b45f59a9a3fb0617141987c2427cefb7087/lstail-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f7c196b075d8f8de17245d22dca398c77cf9de71d21f17662352ecdd763d5ef",
                "md5": "816eda13cc7e1eedb792cf2252953bc0",
                "sha256": "146529a8f54199a2d2cb673953d8c24e0062f00157f1a94f26d3c29e8cd14e96"
            },
            "downloads": -1,
            "filename": "lstail-1.2.0.tar.gz",
            "has_sig": true,
            "md5_digest": "816eda13cc7e1eedb792cf2252953bc0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 33729,
            "upload_time": "2023-01-14T11:59:53",
            "upload_time_iso_8601": "2023-01-14T11:59:53.246838Z",
            "url": "https://files.pythonhosted.org/packages/3f/7c/196b075d8f8de17245d22dca398c77cf9de71d21f17662352ecdd763d5ef/lstail-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-14 11:59:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "eht16",
    "github_project": "lstail",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "lstail"
}
        
Elapsed time: 0.02784s