Metadata-Version: 2.4
Name: logalizer
Version: 0.2.0
Summary: Export Kibana logs as CSV from the command line via the Kibana Reporting API.
Author: isdmx
License: MIT
Project-URL: Homepage, https://github.com/isdmx/logalizer
Project-URL: Repository, https://github.com/isdmx/logalizer
Keywords: kibana,elasticsearch,csv,logs,export,cli
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: System :: Logging
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# logalizer

Export Kibana logs as CSV from the command line — via the Kibana 7.17
Reporting API. No third-party dependencies (pure Python stdlib).

`logalizer` authenticates to Kibana with basic auth, submits a CSV reporting
job, polls until it completes, and writes the result to stdout or a file. It is
built for both humans and scripts: clean exit codes and a strict stdout/stderr
separation so `logalizer ... > out.csv` always yields only CSV on stdout.

## Install

    pip install logalizer

Requires Python 3.10+.

## Configure

    logalizer --init

Interactive wizard that validates your credentials and lets you pick a space and
index pattern from live lists. Or set environment variables:

    export KIBANA_URL=https://...
    export KIBANA_USERNAME=...
    export KIBANA_PASSWORD=...

## Usage

    # test connectivity and configuration
    logalizer --ping

    # discover what's available
    logalizer --list-spaces
    logalizer --list-indices --space <space>
    logalizer --list-fields --index '<pattern>'

    # export logs as CSV
    logalizer -i '<index-pattern>' --query 'level:error' --last 24h \
        --fields '@timestamp,level,msg' -o errors.csv

Run `logalizer --help` for the full reference and `logalizer --help-json` for a
machine-readable flag schema.

## Release

Publishing is automated via GitHub Actions Trusted Publishing.

One-time setup on PyPI: project settings → Publishing → add a "pending
publisher" with owner `isdmx`, repository `logalizer`, workflow `publish.yml`,
environment `pypi`.

After that, cut a release with:

    git tag v0.1.0
    git push --tags

CI builds the sdist + wheel and uploads them to PyPI automatically.

## License

MIT
