Skip to content

wmariuss/eslog

Repository files navigation

eslog

pipeline status Code style: black License

Get and send logs.

Requirements

  • Python >= 3.7
  • Elastic Stack >= 7.x

Install

Production:

  • Export environment variables. Example:

    export ELASTICSEARCH_HOSTS=localhost # Default: localhost
    export ELASTICSEARCH_USER=user # Default: eslog
    export ELASTICSEARCH_PASS=pass # Default: eslog
    export FILE_LOG_PATH=/tmp # Default: /tmp
  • For easy deployment this is built as executable. You can download it from release section.

Development:

  • cp env .env and change the values with yours
  • pip install pipenv
  • pipenv install --dev

Build executable:

  • pipenv run tox -e package

Usage

List all indexes

eslog list

Get and archive log file generated

eslog logs --index loc-filebeat --start 2020-02-19T23:59:59 --end 2020-02-20T23:59:59 (--end command is optional)

Help

eslog --help

More info, here.

Tests

pytest -s -v

Contribute

Contributions are always welcome.

  • Fork the repo
  • Create a pull request against master
  • Be sure tests pass (if exists)

Check GitHub Flow for details.

Authors

About

Get and send logs from elasticsearch.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published