Get and send logs.
Python >= 3.7
Elastic Stack >= 7.x
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 yourspip install pipenv
pipenv install --dev
Build executable:
pipenv run tox -e package
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.
pytest -s -v
Contributions are always welcome.
- Fork the repo
- Create a pull request against master
- Be sure tests pass (if exists)
Check GitHub Flow for details.