From d42670be6d4458f503e433d20e8618c2ff75add2 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 31 May 2023 04:38:02 +0000 Subject: automatic import of python-nosparser --- .gitignore | 1 + python-nosparser.spec | 326 ++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 328 insertions(+) create mode 100644 python-nosparser.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..3ddf022 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Nosparser-0.11.tar.gz diff --git a/python-nosparser.spec b/python-nosparser.spec new file mode 100644 index 0000000..cd36754 --- /dev/null +++ b/python-nosparser.spec @@ -0,0 +1,326 @@ +%global _empty_manifest_terminate_build 0 +Name: python-Nosparser +Version: 0.11 +Release: 1 +Summary: Persistent & streaming log template miner +License: MIT +URL: https://pypi.org/project/Nosparser/ +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/cb/2e/4eaf20c8ff7b90936e7b58b65c39a7f68c4a2b9f2e34b84ee08e0ff8a47b/Nosparser-0.11.tar.gz +BuildArch: noarch + +Requires: python3-jsonpickle +Requires: python3-cachetools + +%description +# Drain3 + +## Introduction + +Drain3 is an online log template miner that can extract templates (clusters) from a stream of log messages in a timely +manner. It employs a parse tree with fixed depth to guide the log group search process, which effectively avoids +constructing a very deep and unbalanced tree. + +Drain3 continuously learns on-the-fly and automatically extracts "log templates" from raw log entries. + +#### Example: + +For the input: + +``` +connected to 10.0.0.1 +connected to 10.0.0.2 +connected to 10.0.0.3 +Hex number 0xDEADBEAF +Hex number 0x10000 +user davidoh logged in +user eranr logged in +``` + +Drain3 extracts the following templates: + +``` +ID=1 : size=3 : connected to <:IP:> +ID=2 : size=2 : Hex number <:HEX:> +ID=3 : size=2 : user <:*:> logged in +``` + +Full sample program output: + +``` +Starting Drain3 template miner +Checking for saved state +Saved state not found +Drain3 started with 'FILE' persistence +reading from std-in (input 'q' to finish) +> connected to 10.0.0.1 +Saving state of 1 clusters with 1 messages, 964 bytes, reason: cluster_created (1) +{"change_type": "cluster_created", "cluster_id": 1, "cluster_size": 1, "template_mined": "connected to <:IP:>", "cluster_count": 1} +parameters: ['10.0.0.1'] +> connected to 10.0.0.2 +{"change_type": "none", "cluster_id": 1, "cluster_size": 2, "template_mined": "connected to <:IP:>", "cluster_count": 1} +parameters: ['10.0.0.2'] +> connected to 10.0.0.3 +{"change_type": "none", "cluster_id": 1, "cluster_size": 3, "template_mined": "connected to <:IP:>", "cluster_count": 1} +parameters: ['10.0.0.3'] +> Hex number 0xDEADBEAF +Saving state of 2 clusters with 4 messages, 1120 bytes, reason: cluster_created (2) +{"change_type": "cluster_created", "cluster_id": 2, "cluster_size": 1, "template_mined": "Hex number <:HEX:>", "cluster_count": 2} +parameters: ['0xDEADBEAF'] +> Hex number 0x10000 +{"change_type": "none", "cluster_id": 2, "cluster_size": 2, "template_mined": "Hex number <:HEX:>", "cluster_count": 2} +parameters: ['0x10000'] +> user davidoh logged in +Saving state of 3 clusters with 6 messages, 1164 bytes, reason: cluster_created (3) +{"change_type": "cluster_created", "cluster_id": 3, "cluster_size": 1, "template_mined": "user davidoh logged in", "cluster_count": 3} +parameters: [] +> user eranr logged in +Saving state of 3 clusters with 7 messages, 1168 bytes, reason: cluster_template_changed (3) +{"change_type": "cluster_template_changed", "cluster_id": 3, "cluster_size": 2, "template_mined": "user <:*:> logged in", "cluster_count": 3} +parameters: ['eranr'] +q +Clusters: +ID=1 : size=3 : connected to <:IP:> +ID=2 : size=2 : Hex number <:HEX:> +ID=3 : size=2 : user <:*:> logged in +``` + +This project is an upgrade of the original [Drain](https://github.com/logpai/logparser/blob/master/logparser/Drain) +project by LogPAI from Python 2.7 to Python 3.6 or later with some bug-fixes and additional features. + +Read more information about Drain from the following paper: + +- Pinjia He, Jieming Zhu, Zibin Zheng, and Michael R. + Lyu. [Drain: An Online Log Parsing Approach with Fixed Depth Tree](https://pinjiahe.github.io/papers/ICWS17.pdf), + Proceedings of the 24th International Conference on Web Services (ICWS), 2017. + + + + + + +%package -n python3-Nosparser +Summary: Persistent & streaming log template miner +Provides: python-Nosparser +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-Nosparser +# Drain3 + +## Introduction + +Drain3 is an online log template miner that can extract templates (clusters) from a stream of log messages in a timely +manner. It employs a parse tree with fixed depth to guide the log group search process, which effectively avoids +constructing a very deep and unbalanced tree. + +Drain3 continuously learns on-the-fly and automatically extracts "log templates" from raw log entries. + +#### Example: + +For the input: + +``` +connected to 10.0.0.1 +connected to 10.0.0.2 +connected to 10.0.0.3 +Hex number 0xDEADBEAF +Hex number 0x10000 +user davidoh logged in +user eranr logged in +``` + +Drain3 extracts the following templates: + +``` +ID=1 : size=3 : connected to <:IP:> +ID=2 : size=2 : Hex number <:HEX:> +ID=3 : size=2 : user <:*:> logged in +``` + +Full sample program output: + +``` +Starting Drain3 template miner +Checking for saved state +Saved state not found +Drain3 started with 'FILE' persistence +reading from std-in (input 'q' to finish) +> connected to 10.0.0.1 +Saving state of 1 clusters with 1 messages, 964 bytes, reason: cluster_created (1) +{"change_type": "cluster_created", "cluster_id": 1, "cluster_size": 1, "template_mined": "connected to <:IP:>", "cluster_count": 1} +parameters: ['10.0.0.1'] +> connected to 10.0.0.2 +{"change_type": "none", "cluster_id": 1, "cluster_size": 2, "template_mined": "connected to <:IP:>", "cluster_count": 1} +parameters: ['10.0.0.2'] +> connected to 10.0.0.3 +{"change_type": "none", "cluster_id": 1, "cluster_size": 3, "template_mined": "connected to <:IP:>", "cluster_count": 1} +parameters: ['10.0.0.3'] +> Hex number 0xDEADBEAF +Saving state of 2 clusters with 4 messages, 1120 bytes, reason: cluster_created (2) +{"change_type": "cluster_created", "cluster_id": 2, "cluster_size": 1, "template_mined": "Hex number <:HEX:>", "cluster_count": 2} +parameters: ['0xDEADBEAF'] +> Hex number 0x10000 +{"change_type": "none", "cluster_id": 2, "cluster_size": 2, "template_mined": "Hex number <:HEX:>", "cluster_count": 2} +parameters: ['0x10000'] +> user davidoh logged in +Saving state of 3 clusters with 6 messages, 1164 bytes, reason: cluster_created (3) +{"change_type": "cluster_created", "cluster_id": 3, "cluster_size": 1, "template_mined": "user davidoh logged in", "cluster_count": 3} +parameters: [] +> user eranr logged in +Saving state of 3 clusters with 7 messages, 1168 bytes, reason: cluster_template_changed (3) +{"change_type": "cluster_template_changed", "cluster_id": 3, "cluster_size": 2, "template_mined": "user <:*:> logged in", "cluster_count": 3} +parameters: ['eranr'] +q +Clusters: +ID=1 : size=3 : connected to <:IP:> +ID=2 : size=2 : Hex number <:HEX:> +ID=3 : size=2 : user <:*:> logged in +``` + +This project is an upgrade of the original [Drain](https://github.com/logpai/logparser/blob/master/logparser/Drain) +project by LogPAI from Python 2.7 to Python 3.6 or later with some bug-fixes and additional features. + +Read more information about Drain from the following paper: + +- Pinjia He, Jieming Zhu, Zibin Zheng, and Michael R. + Lyu. [Drain: An Online Log Parsing Approach with Fixed Depth Tree](https://pinjiahe.github.io/papers/ICWS17.pdf), + Proceedings of the 24th International Conference on Web Services (ICWS), 2017. + + + + + + +%package help +Summary: Development documents and examples for Nosparser +Provides: python3-Nosparser-doc +%description help +# Drain3 + +## Introduction + +Drain3 is an online log template miner that can extract templates (clusters) from a stream of log messages in a timely +manner. It employs a parse tree with fixed depth to guide the log group search process, which effectively avoids +constructing a very deep and unbalanced tree. + +Drain3 continuously learns on-the-fly and automatically extracts "log templates" from raw log entries. + +#### Example: + +For the input: + +``` +connected to 10.0.0.1 +connected to 10.0.0.2 +connected to 10.0.0.3 +Hex number 0xDEADBEAF +Hex number 0x10000 +user davidoh logged in +user eranr logged in +``` + +Drain3 extracts the following templates: + +``` +ID=1 : size=3 : connected to <:IP:> +ID=2 : size=2 : Hex number <:HEX:> +ID=3 : size=2 : user <:*:> logged in +``` + +Full sample program output: + +``` +Starting Drain3 template miner +Checking for saved state +Saved state not found +Drain3 started with 'FILE' persistence +reading from std-in (input 'q' to finish) +> connected to 10.0.0.1 +Saving state of 1 clusters with 1 messages, 964 bytes, reason: cluster_created (1) +{"change_type": "cluster_created", "cluster_id": 1, "cluster_size": 1, "template_mined": "connected to <:IP:>", "cluster_count": 1} +parameters: ['10.0.0.1'] +> connected to 10.0.0.2 +{"change_type": "none", "cluster_id": 1, "cluster_size": 2, "template_mined": "connected to <:IP:>", "cluster_count": 1} +parameters: ['10.0.0.2'] +> connected to 10.0.0.3 +{"change_type": "none", "cluster_id": 1, "cluster_size": 3, "template_mined": "connected to <:IP:>", "cluster_count": 1} +parameters: ['10.0.0.3'] +> Hex number 0xDEADBEAF +Saving state of 2 clusters with 4 messages, 1120 bytes, reason: cluster_created (2) +{"change_type": "cluster_created", "cluster_id": 2, "cluster_size": 1, "template_mined": "Hex number <:HEX:>", "cluster_count": 2} +parameters: ['0xDEADBEAF'] +> Hex number 0x10000 +{"change_type": "none", "cluster_id": 2, "cluster_size": 2, "template_mined": "Hex number <:HEX:>", "cluster_count": 2} +parameters: ['0x10000'] +> user davidoh logged in +Saving state of 3 clusters with 6 messages, 1164 bytes, reason: cluster_created (3) +{"change_type": "cluster_created", "cluster_id": 3, "cluster_size": 1, "template_mined": "user davidoh logged in", "cluster_count": 3} +parameters: [] +> user eranr logged in +Saving state of 3 clusters with 7 messages, 1168 bytes, reason: cluster_template_changed (3) +{"change_type": "cluster_template_changed", "cluster_id": 3, "cluster_size": 2, "template_mined": "user <:*:> logged in", "cluster_count": 3} +parameters: ['eranr'] +q +Clusters: +ID=1 : size=3 : connected to <:IP:> +ID=2 : size=2 : Hex number <:HEX:> +ID=3 : size=2 : user <:*:> logged in +``` + +This project is an upgrade of the original [Drain](https://github.com/logpai/logparser/blob/master/logparser/Drain) +project by LogPAI from Python 2.7 to Python 3.6 or later with some bug-fixes and additional features. + +Read more information about Drain from the following paper: + +- Pinjia He, Jieming Zhu, Zibin Zheng, and Michael R. + Lyu. [Drain: An Online Log Parsing Approach with Fixed Depth Tree](https://pinjiahe.github.io/papers/ICWS17.pdf), + Proceedings of the 24th International Conference on Web Services (ICWS), 2017. + + + + + + +%prep +%autosetup -n Nosparser-0.11 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-Nosparser -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 31 2023 Python_Bot - 0.11-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..2501537 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +2c4085292c9369f166cac91175a9f82c Nosparser-0.11.tar.gz -- cgit v1.2.3