Skip to content

Conversation

@AlainLich
Copy link

Hi,
This PR:

  1. ports to Python3, but not compatible with Python2 (sorry). Some areas not covered (geoIP, ̀logfilter`).
  2. database interfaces supported: Mysql 8.x and SQLite. This required moving to up to date SQLAlchemy, getting rid of
    sqlsoup
  3. some extensions, as described on https://github.com/AlainLich/logtools/blob/ALPython3/PYTHON3-ADDITIONS.md. This allows for more log formats, added flexibility, handling of JSON input.
  4. tests see https://github.com/AlainLich/logtools/actions (including Mysql and SQLite) Involves some secrets (as defined by
    Github)

Full functionality depends on using a non standard version of dpath_python https://github.com/AlainLich/dpath-python,
for which a PR is pending. May make distribution more complicated.

I will take remarks into account if this facilitates integration, response could depend on amount of work involved.

This is not modular (sorry), things got interesting enough to warrant a PR quite late in the development, when I found out that I had to move to up to date SQLAlchemy, not compatible with sqlsoup.

AlainLich and others added 30 commits March 13, 2021 15:08
…etween locale and datetime.strptime

Passes all tests with Python3 Python 3.8.6 (in locale FR_fr)
Note that doing so uncovers some porting issues in code sections not covered by other tests.
…5424 to work in this environment

This checkpoint prepares move of class RSyParsing to parsers2.py
- adds ''traditional templates'' via class RSysTradiVariant,
  - defined formats FileFormat,  TraditionalFileFormat, ForwardFormat, TraditionalForwardFormat.
- adds SyslogRFC5424 for parsing this format requires package syslog_rfc5424_parser
Inspired by Github Actions Quickstart:
https://docs.github.com/en/actions/quickstart

See what happens!
Try correction to yaml (next step will be RTFM)
Correcting YAML syntax
Removed automated workflow submission on push; manual dispatch for lint and python/logtools
…ing on Github Actions platform;

may need further investigation in os.system launched scripts
…o improve

SQL parametrization, json log input. Later may also want to put log extract in DB
Logdb added with ability to load a database table from JSON data using a tree like schema
Utility to walk JSON facilitating interface to class implementing insertion in database

Checkpoint first (partly) successful execution against the DB ('tree')

Fiils tree table from inspect data

Logdb able to load a database (with a tree like schema) from an extracted JSON.
Multiple JSONs loads are managed by timestamp.
AlainLich added 29 commits May 18, 2021 12:39
…lication dependent code in logtools/ext_db.py
This version checks whether we have a full featured dpath (from AlainLich/dpath-python;
PR pending) or the default (from Pypi), to set flags and warn the user.
the tests are dependent on this interface, the logtools library should not
require this since a different DB or interface might be used
…n non DB

Yaml script, definition of SQlite file in Yaml script.
…gtoolsrc.sh

Improved formatting in SQLite output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant