No project description provided
Project description
pat-cli
Overview
pat-cli is a tool for clustering logs based on the textual content of the log.
The tool uses a two-step process to achieve this:
Vectorization: In this step, the log statement is converted into a vector in an n-dimensional space. This way, we can treat logs just like we treat points on a 2D graph and try to cluster them. The only difference is that the dimension of this space.
To achieve this vectorization, few algorithms can be employed. The available algorithms can be found using the help page of the tool, but one example is the TF-IDF.
Usually, vectorization involves a sub-step called tokenization. In this step, the logs are broken down into a set of tokens. For example, a log like "Writing output to file" can be broken down into the following tokens: "writing", "output", "to", "file". This allows the tool to understand the textual content of the logs. For example, in the TF-IDF algorithm, the frequencies of the words (tokens) making up each log statement are used to determine how important each word in the log is.
Clustering: In this step, a clustering algorithm like K-Means or Birch is used to cluster the logs into multiple groups that are likely to be similar to each other.
Installation
First, clone the code locally:
git clone https://github.com/rafidka/pat-cli.git
After that, you need to install the Python requirements. It is recommended that you create a virtual or Conda environment.
pip install -r requirements.txt
Finally, run the help page to learn how to use the tool:
python main.py --help
Issue
If you create any issue, feel free to create a GitHub Issue in this repository and I will try to address it or respond to it as soon as possible.
Contribution
Contribution is welcome. If you have an interesting addition to the tool, be it another vectorization or clustering algorithm, feel free to publish a PR.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pat_cli-0.1.0.tar.gz.
File metadata
- Download URL: pat_cli-0.1.0.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-1018-gcp
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec56f13b61c8912ec659f965b1ade3b6f82da2b420509f45c056c20fe846760b
|
|
| MD5 |
fcf1ba01999736fcb29d5a7ab2aeacdd
|
|
| BLAKE2b-256 |
0d8479369a5082d28e27bdfcd933db39de86f468857abfa1d069f4306c655147
|
File details
Details for the file pat_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pat_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.3 Linux/6.8.0-1018-gcp
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26205a551028e01d4249eac5b4c48fd39a0f2fb743cf595ce29a0a0a976bf3fa
|
|
| MD5 |
58b08b4fdc8781b56c55ee7a5f01fdaf
|
|
| BLAKE2b-256 |
ee02151ee2b18fb823273a4c2325f233d84a3d60349fa5b88717745efca35f13
|