%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