From a22c3249fec3d3f89594a66bca4924b7184c5dde Mon Sep 17 00:00:00 2001 From: zhujiem Date: Tue, 18 Jul 2023 15:04:48 +0800 Subject: [PATCH] Update logparser v1.0.0 to support Python 3 compatibility * Fix PRs: #86, #85, #83, #80, #78, #65, #57, #53, #52, #51, #49 * Fix issues: #98, #79, #72, #84, #75, #71, #69, #56, #50, #45, #16, #82 --- .gitignore | 1 - CITATION | 18 +- LICENSE | 328 +- README.md | 161 +- THIRD_PARTIES.md | 9 + benchmark/AEL_benchmark.py | 164 - benchmark/Drain_benchmark.py | 163 - benchmark/IPLoM_benchmark.py | 164 - benchmark/LFA_benchmark.py | 131 - benchmark/LKE_benchmark.py | 148 - benchmark/Lenma_benchmark.py | 151 - benchmark/LogCluster_benchmark.py | 147 - benchmark/LogMine_benchmark.py | 180 - benchmark/LogSig_benchmark.py | 145 - benchmark/MoLFI_benchmark.py | 131 - benchmark/SHISO_benchmark.py | 197 - benchmark/SLCT_benchmark.py | 148 - benchmark/Spell_benchmark.py | 148 - data/README.md | 18 + data/loghub/LICENSE | 1 - data/loghub/Mac/Mac.log | 117283 --------------- .../Android/Android_2k.log} | 0 .../Android/Android_2k.log_structured.csv} | 0 .../Android/Android_2k.log_templates.csv} | 0 data/loghub_2k/Android/README.md | 23 + .../Apache/Apache_2k.log | 0 .../Apache/Apache_2k.log_structured.csv | 0 .../Apache/Apache_2k.log_templates.csv | 0 data/loghub_2k/Apache/README.md | 11 + data/{loghub => loghub_2k}/BGL/BGL_2k.log | 0 .../BGL/BGL_2k.log_structured.csv | 0 .../BGL/BGL_2k.log_templates.csv | 0 .../BGL/BGL_templates.csv | 0 data/loghub_2k/BGL/README.md | 12 + data/{loghub => loghub_2k}/HDFS/HDFS_2k.log | 0 .../HDFS/HDFS_2k.log_structured.csv | 0 .../HDFS/HDFS_2k.log_templates.csv | 0 .../HDFS/HDFS_templates.csv | 0 data/loghub_2k/HDFS/README.md | 60 + data/{loghub => loghub_2k}/HPC/HPC_2k.log | 0 .../HPC/HPC_2k.log_structured.csv | 0 .../HPC/HPC_2k.log_templates.csv | 0 data/loghub_2k/HPC/README.md | 12 + .../Hadoop/Hadoop_2k.log | 0 .../Hadoop/Hadoop_2k.log_structured.csv | 0 .../Hadoop/Hadoop_2k.log_templates.csv | 0 data/loghub_2k/Hadoop/README.md | 21 + .../HealthApp/HealthApp_2k.log | 0 .../HealthApp/HealthApp_2k.log_structured.csv | 0 .../HealthApp/HealthApp_2k.log_templates.csv | 0 data/loghub_2k/HealthApp/README.md | 10 + data/loghub_2k/LICENSE | 9 + data/{loghub => loghub_2k}/Linux/Linux_2k.log | 0 .../Linux/Linux_2k.log_structured.csv | 0 .../Linux/Linux_2k.log_templates.csv | 0 data/loghub_2k/Linux/README.md | 12 + data/{loghub => loghub_2k}/Mac/Mac_2k.log | 0 .../Mac/Mac_2k.log_structured.csv | 0 .../Mac/Mac_2k.log_templates.csv | 0 data/loghub_2k/Mac/README.md | 11 + .../OpenSSH/OpenSSH_2k.log | 0 .../OpenSSH/OpenSSH_2k.log_structured.csv | 0 .../OpenSSH/OpenSSH_2k.log_templates.csv | 0 data/loghub_2k/OpenSSH/README.md | 11 + .../OpenStack/OpenStack_2k.log | 0 .../OpenStack/OpenStack_2k.log_structured.csv | 0 .../OpenStack/OpenStack_2k.log_templates.csv | 0 data/loghub_2k/OpenStack/README.md | 13 + .../Proxifier/Proxifier_2k.log | 0 .../Proxifier/Proxifier_2k.log_structured.csv | 0 .../Proxifier/Proxifier_2k.log_templates.csv | 0 data/loghub_2k/Proxifier/README.md | 10 + data/{loghub => loghub_2k}/README.md | 74 +- data/loghub_2k/Spark/README.md | 11 + data/{loghub => loghub_2k}/Spark/Spark_2k.log | 0 .../Spark/Spark_2k.log_structured.csv | 0 .../Spark/Spark_2k.log_templates.csv | 0 data/loghub_2k/Thunderbird/README.md | 12 + .../Thunderbird/Thunderbird_2k.log | 0 .../Thunderbird_2k.log_structured.csv | 0 .../Thunderbird_2k.log_templates.csv | 0 data/loghub_2k/Windows/README.md | 10 + .../Windows/Windows_2k.log | 0 .../Windows/Windows_2k.log_structured.csv | 0 .../Windows/Windows_2k.log_templates.csv | 0 data/loghub_2k/Zookeeper/README.md | 10 + .../Zookeeper/Zookeeper_2k.log | 0 .../Zookeeper/Zookeeper_2k.log_structured.csv | 0 .../Zookeeper/Zookeeper_2k.log_templates.csv | 0 .../Android/Android_2k.log | 2000 + .../Android/Android_2k.log_structured.csv | 2001 + .../Android_2k.log_structured_corrected.csv | 2001 + .../Android/Android_2k.log_templates.csv | 167 + .../Android_2k.log_templates_corrected.csv | 159 + data/loghub_2k_corrected/Apache/Apache_2k.log | 2000 + .../Apache/Apache_2k.log_structured.csv | 2001 + .../Apache_2k.log_structured_corrected.csv | 2001 + .../Apache/Apache_2k.log_templates.csv | 7 + .../Apache_2k.log_templates_corrected.csv | 7 + data/loghub_2k_corrected/BGL/BGL_2k.log | 2000 + .../BGL/BGL_2k.log_structured.csv | 2001 + .../BGL/BGL_2k.log_structured_corrected.csv | 2001 + .../BGL/BGL_2k.log_templates.csv | 121 + .../BGL/BGL_2k.log_templates_corrected.csv | 121 + data/loghub_2k_corrected/HDFS/HDFS_2k.log | 2000 + .../HDFS/HDFS_2k.log_structured.csv | 2001 + .../HDFS/HDFS_2k.log_structured_corrected.csv | 2001 + .../HDFS/HDFS_2k.log_templates.csv | 15 + .../HDFS/HDFS_2k.log_templates_corrected.csv | 15 + data/loghub_2k_corrected/HPC/HPC_2k.log | 2000 + .../HPC/HPC_2k.log_structured.csv | 2001 + .../HPC/HPC_2k.log_structured_corrected.csv | 2001 + .../HPC/HPC_2k.log_templates.csv | 47 + .../HPC/HPC_2k.log_templates_corrected.csv | 47 + data/loghub_2k_corrected/Hadoop/Hadoop_2k.log | 2000 + .../Hadoop/Hadoop_2k.log_structured.csv | 2001 + .../Hadoop_2k.log_structured_corrected.csv | 2001 + .../Hadoop/Hadoop_2k.log_templates.csv | 115 + .../Hadoop_2k.log_templates_corrected.csv | 115 + .../HealthApp/HealthApp_2k.log | 2000 + .../HealthApp/HealthApp_2k.log_structured.csv | 2001 + .../HealthApp_2k.log_structured_corrected.csv | 2001 + .../HealthApp/HealthApp_2k.log_templates.csv | 76 + .../HealthApp_2k.log_templates_corrected.csv | 76 + data/loghub_2k_corrected/Linux/Linux_2k.log | 2000 + .../Linux/Linux_2k.log_structured.csv | 2001 + .../Linux_2k.log_structured_corrected.csv | 2001 + .../Linux/Linux_2k.log_templates.csv | 119 + .../Linux_2k.log_templates_corrected.csv | 117 + data/loghub_2k_corrected/Mac/Mac_2k.log | 2000 + .../Mac/Mac_2k.log_structured.csv | 2007 + .../Mac/Mac_2k.log_structured_corrected.csv | 2001 + .../Mac/Mac_2k.log_templates.csv | 344 + .../Mac/Mac_2k.log_templates_corrected.csv | 344 + .../OpenSSH/OpenSSH_2k.log | 2000 + .../OpenSSH/OpenSSH_2k.log_structured.csv | 2001 + .../OpenSSH_2k.log_structured_corrected.csv | 2001 + .../OpenSSH/OpenSSH_2k.log_templates.csv | 28 + .../OpenSSH_2k.log_templates_corrected.csv | 27 + .../OpenStack/OpenStack_2k.log | 2000 + .../OpenStack/OpenStack_2k.log_structured.csv | 2001 + .../OpenStack_2k.log_structured_corrected.csv | 2001 + .../OpenStack/OpenStack_2k.log_templates.csv | 44 + .../OpenStack_2k.log_templates_corrected.csv | 44 + .../Proxifier/Proxifier_2k.log | 2000 + .../Proxifier/Proxifier_2k.log_structured.csv | 2001 + .../Proxifier_2k.log_structured_corrected.csv | 2001 + .../Proxifier/Proxifier_2k.log_templates.csv | 9 + .../Proxifier_2k.log_templates_corrected.csv | 9 + data/loghub_2k_corrected/Spark/Spark_2k.log | 2000 + .../Spark/Spark_2k.log_structured.csv | 2001 + .../Spark_2k.log_structured_corrected.csv | 2001 + .../Spark/Spark_2k.log_templates.csv | 37 + .../Spark_2k.log_templates_corrected.csv | 37 + .../Thunderbird/Thunderbird_2k.log | 2000 + .../Thunderbird_2k.log_structured.csv | 2001 + ...hunderbird_2k.log_structured_corrected.csv | 2001 + .../Thunderbird_2k.log_templates.csv | 150 + ...Thunderbird_2k.log_templates_corrected.csv | 150 + .../Windows/Windows_2k.log | 2000 + .../Windows/Windows_2k.log_structured.csv | 2001 + .../Windows_2k.log_structured_corrected.csv | 2001 + .../Windows/Windows_2k.log_templates.csv | 51 + .../Windows_2k.log_templates_corrected.csv | 51 + .../Zookeeper/Zookeeper_2k.log | 2000 + .../Zookeeper/Zookeeper_2k.log_structured.csv | 2001 + .../Zookeeper_2k.log_structured_corrected.csv | 2001 + .../Zookeeper/Zookeeper_2k.log_templates.csv | 51 + .../Zookeeper_2k.log_templates_corrected.csv | 51 + data/test_log/unknow.log | 284 + demo/AEL_demo.py | 17 - demo/LFA_demo.py | 13 - demo/SLCT_demo.py | 16 - demo/logmatch_demo.py | 16 - docs/img/accuracy.png | Bin 105423 -> 0 bytes docs/img/example.jpg | Bin 0 -> 186230 bytes docs/img/example.png | Bin 43533 -> 0 bytes docs/img/parsers.png | Bin 16842 -> 0 bytes example/parse_your_own_logs.py | 23 + logparser/AEL/AEL.py | 494 +- logparser/AEL/README.md | 59 +- logparser/AEL/__init__.py | 2 +- logparser/AEL/benchmark.py | 181 + logparser/AEL/demo.py | 17 + logparser/AEL/requirements.txt | 4 + logparser/Drain/Drain.py | 720 +- logparser/Drain/README.md | 63 +- logparser/Drain/benchmark.py | 181 + demo/Drain_demo.py => logparser/Drain/demo.py | 12 +- .../demo_result/HDFS_2k.log_structured.csv | 2001 + .../demo_result/HDFS_2k.log_templates.csv | 17 + logparser/Drain/requirements.txt | 4 + logparser/IPLoM/IPLoM.py | 329 +- logparser/IPLoM/README.md | 56 +- logparser/IPLoM/benchmark.py | 179 + demo/IPLoM_demo.py => logparser/IPLoM/demo.py | 14 +- logparser/IPLoM/requirements.txt | 4 + logparser/LFA/LFA.py | 287 +- logparser/LFA/README.md | 58 +- logparser/LFA/__init__.py | 2 +- logparser/LFA/benchmark.py | 146 + logparser/LFA/demo.py | 14 + logparser/LFA/requirements.txt | 4 + logparser/LKE/LKE.py | 1136 +- logparser/LKE/README.md | 55 +- logparser/LKE/__init__.py | 2 +- logparser/LKE/benchmark.py | 164 + demo/LKE_demo.py => logparser/LKE/demo.py | 14 +- logparser/LKE/requirements.txt | 4 + logparser/LenMa/LenMa.py | 100 - logparser/LenMa/README.md | 56 +- logparser/LenMa/__init__.py | 2 +- logparser/LenMa/benchmark.py | 166 + demo/LenMa_demo.py => logparser/LenMa/demo.py | 11 +- logparser/LenMa/requirements.txt | 4 + .../LenMa/{templateminer => src}/LICENSE | 0 logparser/LenMa/src/LenMa.py | 128 + .../LenMa/{templateminer => src}/__init__.py | 0 .../{templateminer => src}/lenma_template.py | 35 +- .../LenMa/{templateminer => src}/template.py | 29 +- logparser/LogCluster/LogCluster.py | 172 - logparser/LogCluster/README.md | 56 +- logparser/LogCluster/__init__.py | 2 +- logparser/LogCluster/benchmark.py | 161 + .../LogCluster/demo.py | 12 +- logparser/LogCluster/requirements.txt | 4 + logparser/LogCluster/src/COPYING | 340 + logparser/LogCluster/src/LogCluster.py | 241 + .../main => LogCluster/src}/__init__.py | 0 logparser/LogCluster/{ => src}/logcluster.pl | 0 logparser/LogMine/README.md | 55 +- logparser/LogMine/__init__.py | 2 +- logparser/LogMine/benchmark.py | 195 + .../LogMine/demo.py | 11 +- logparser/LogMine/requirements.txt | 4 + logparser/LogMine/{ => src}/LogMine.py | 453 +- .../main/org => LogMine/src}/__init__.py | 0 logparser/LogMine/{ => src}/alignment.py | 6 +- logparser/LogSig/LogSig.py | 644 +- logparser/LogSig/README.md | 59 +- logparser/LogSig/__init__.py | 2 +- logparser/LogSig/benchmark.py | 160 + .../LogSig/demo.py | 10 +- logparser/LogSig/requirements.txt | 4 + logparser/MoLFI/MoLFI.py | 61 - logparser/MoLFI/README.md | 81 +- logparser/MoLFI/__init__.py | 2 +- logparser/MoLFI/benchmark.py | 144 + demo/MoLFI_demo.py => logparser/MoLFI/demo.py | 11 +- logparser/MoLFI/requirements.txt | 7 +- logparser/MoLFI/setup.py | 12 - logparser/MoLFI/src/LICENSE | 201 + logparser/MoLFI/{ => src}/Makefile | 0 logparser/MoLFI/src/MoLFI.py | 76 + .../MoLFI/{main/org/core => src}/__init__.py | 0 logparser/MoLFI/{ => src}/definitions.py | 0 .../core/chromosome => src/main}/__init__.py | 0 .../core/fitness => src/main/org}/__init__.py | 0 .../main/org/core}/__init__.py | 0 .../main/org/core/chromosome}/__init__.py | 0 .../main/org/core/chromosome/chromosome.py | 0 .../main/org/core/chromosome/template.py | 0 .../main/org/core/fitness}/__init__.py | 0 .../main/org/core/fitness/objectives2D.py | 0 .../org/core/metaheuristics/NSGA_II_2D.py | 0 .../main/org/core/metaheuristics}/__init__.py | 0 .../main/org/core/operators}/__init__.py | 0 .../main/org/core/operators/crossover.py | 0 .../main/org/core/operators/mutation.py | 0 .../org/core/operators/mutation_100cov.py | 0 .../main/org/core/operators/selection.py | 0 .../main/org/core/post_process}/__init__.py | 0 .../post_process/post_process_chromosomes.py | 0 .../org/core/utility/Chromosome_Generator.py | 0 .../main/org/core/utility}/__init__.py | 0 .../core/utility/chromosome_corrections.py | 0 .../main/org/core/utility/log_file_reader.py | 0 .../core/utility/log_message_adaptation.py | 0 .../main/org/core/utility/match_utility.py | 0 .../main/org/core/utility/message.py | 0 .../main/org/core/validation}/__init__.py | 0 .../main/org/core/validation/oracle.py | 0 .../core/validation/validate_chromosomes.py | 0 logparser/MoLFI/{ => src}/validation.py | 0 .../org/core/chromosome/test_chromosome.py | 75 - .../test/org/core/chromosome/test_template.py | 32 - .../MoLFI/test/org/core/fitness/__init__.py | 0 .../org/core/fitness/test_objectives2D.py | 65 - .../MoLFI/test/org/core/operators/__init__.py | 0 .../test/org/core/operators/test_crossover.py | 27 - .../test/org/core/operators/test_mutation.py | 31 - .../core/operators/test_mutation_100cov.py | 45 - .../test/org/core/post_process/__init__.py | 0 .../test_post_process_chromosome.py | 36 - .../test/org/core/test_validation/__init__.py | 0 .../org/core/test_validation/test_oracle.py | 17 - .../test_validate_chromosome.py | 61 - .../MoLFI/test/org/core/utility/__init__.py | 0 .../utility/test_chromosome_corrections.py | 84 - .../core/utility/test_chromosome_generator.py | 78 - .../utility/test_log_message_adaptation.py | 138 - .../org/core/utility/test_match_utility.py | 133 - .../test/org/core/utility/test_message.py | 22 - .../MoLFI/test/resources/oracle_test.txt | 7 - logparser/SHISO/README.md | 53 +- logparser/SHISO/SHISO.py | 847 +- logparser/SHISO/benchmark.py | 212 + demo/SHISO_demo.py => logparser/SHISO/demo.py | 20 +- logparser/SHISO/requirements.txt | 4 + logparser/SLCT/README.md | 59 +- logparser/SLCT/SLCT.py | 204 - logparser/SLCT/__init__.py | 2 +- logparser/SLCT/benchmark.py | 161 + logparser/SLCT/demo.py | 16 + logparser/SLCT/requirements.txt | 4 + logparser/SLCT/src/COPYING | 339 + logparser/SLCT/src/SLCT.py | 250 + .../core/chromosome => SLCT/src}/__init__.py | 0 logparser/SLCT/{ => src}/cslct.c | 0 logparser/SLCT/{ => src}/cslct.h | 0 logparser/Spell/README.md | 57 +- logparser/Spell/Spell.py | 700 +- logparser/Spell/benchmark.py | 162 + demo/Spell_demo.py => logparser/Spell/demo.py | 11 +- logparser/Spell/requirements.txt | 4 + logparser/__init__.py | 2 +- logparser/logmatch/README.md | 25 + logparser/logmatch/__init__.py | 1 + logparser/logmatch/demo.py | 16 + logparser/logmatch/regexmatch.py | 194 +- logparser/logmatch/requirements.txt | 4 + logparser/utils/evaluator.py | 82 +- logparser/utils/logloader.py | 206 +- logparser/version.py | 1 + requirements.txt | 5 + tests/test_all.sh | 19 + tests/test_py2.sh | 42 - tests/test_py3.sh | 9 - 338 files changed, 109945 insertions(+), 123885 deletions(-) create mode 100644 THIRD_PARTIES.md delete mode 100644 benchmark/AEL_benchmark.py delete mode 100644 benchmark/Drain_benchmark.py delete mode 100644 benchmark/IPLoM_benchmark.py delete mode 100644 benchmark/LFA_benchmark.py delete mode 100644 benchmark/LKE_benchmark.py delete mode 100644 benchmark/Lenma_benchmark.py delete mode 100644 benchmark/LogCluster_benchmark.py delete mode 100644 benchmark/LogMine_benchmark.py delete mode 100644 benchmark/LogSig_benchmark.py delete mode 100644 benchmark/MoLFI_benchmark.py delete mode 100644 benchmark/SHISO_benchmark.py delete mode 100644 benchmark/SLCT_benchmark.py delete mode 100644 benchmark/Spell_benchmark.py create mode 100644 data/README.md delete mode 100644 data/loghub/LICENSE delete mode 100644 data/loghub/Mac/Mac.log rename data/{loghub/Andriod/Andriod_2k.log => loghub_2k/Android/Android_2k.log} (100%) rename data/{loghub/Andriod/Andriod_2k.log_structured.csv => loghub_2k/Android/Android_2k.log_structured.csv} (100%) rename data/{loghub/Andriod/Andriod_2k.log_templates.csv => loghub_2k/Android/Android_2k.log_templates.csv} (100%) create mode 100644 data/loghub_2k/Android/README.md rename data/{loghub => loghub_2k}/Apache/Apache_2k.log (100%) rename data/{loghub => loghub_2k}/Apache/Apache_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/Apache/Apache_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/Apache/README.md rename data/{loghub => loghub_2k}/BGL/BGL_2k.log (100%) rename data/{loghub => loghub_2k}/BGL/BGL_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/BGL/BGL_2k.log_templates.csv (100%) rename data/{loghub => loghub_2k}/BGL/BGL_templates.csv (100%) create mode 100644 data/loghub_2k/BGL/README.md rename data/{loghub => loghub_2k}/HDFS/HDFS_2k.log (100%) rename data/{loghub => loghub_2k}/HDFS/HDFS_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/HDFS/HDFS_2k.log_templates.csv (100%) rename data/{loghub => loghub_2k}/HDFS/HDFS_templates.csv (100%) create mode 100644 data/loghub_2k/HDFS/README.md rename data/{loghub => loghub_2k}/HPC/HPC_2k.log (100%) rename data/{loghub => loghub_2k}/HPC/HPC_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/HPC/HPC_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/HPC/README.md rename data/{loghub => loghub_2k}/Hadoop/Hadoop_2k.log (100%) rename data/{loghub => loghub_2k}/Hadoop/Hadoop_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/Hadoop/Hadoop_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/Hadoop/README.md rename data/{loghub => loghub_2k}/HealthApp/HealthApp_2k.log (100%) rename data/{loghub => loghub_2k}/HealthApp/HealthApp_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/HealthApp/HealthApp_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/HealthApp/README.md create mode 100644 data/loghub_2k/LICENSE rename data/{loghub => loghub_2k}/Linux/Linux_2k.log (100%) rename data/{loghub => loghub_2k}/Linux/Linux_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/Linux/Linux_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/Linux/README.md rename data/{loghub => loghub_2k}/Mac/Mac_2k.log (100%) rename data/{loghub => loghub_2k}/Mac/Mac_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/Mac/Mac_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/Mac/README.md rename data/{loghub => loghub_2k}/OpenSSH/OpenSSH_2k.log (100%) rename data/{loghub => loghub_2k}/OpenSSH/OpenSSH_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/OpenSSH/OpenSSH_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/OpenSSH/README.md rename data/{loghub => loghub_2k}/OpenStack/OpenStack_2k.log (100%) rename data/{loghub => loghub_2k}/OpenStack/OpenStack_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/OpenStack/OpenStack_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/OpenStack/README.md rename data/{loghub => loghub_2k}/Proxifier/Proxifier_2k.log (100%) rename data/{loghub => loghub_2k}/Proxifier/Proxifier_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/Proxifier/Proxifier_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/Proxifier/README.md rename data/{loghub => loghub_2k}/README.md (59%) create mode 100644 data/loghub_2k/Spark/README.md rename data/{loghub => loghub_2k}/Spark/Spark_2k.log (100%) rename data/{loghub => loghub_2k}/Spark/Spark_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/Spark/Spark_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/Thunderbird/README.md rename data/{loghub => loghub_2k}/Thunderbird/Thunderbird_2k.log (100%) rename data/{loghub => loghub_2k}/Thunderbird/Thunderbird_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/Thunderbird/Thunderbird_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/Windows/README.md rename data/{loghub => loghub_2k}/Windows/Windows_2k.log (100%) rename data/{loghub => loghub_2k}/Windows/Windows_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/Windows/Windows_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k/Zookeeper/README.md rename data/{loghub => loghub_2k}/Zookeeper/Zookeeper_2k.log (100%) rename data/{loghub => loghub_2k}/Zookeeper/Zookeeper_2k.log_structured.csv (100%) rename data/{loghub => loghub_2k}/Zookeeper/Zookeeper_2k.log_templates.csv (100%) create mode 100644 data/loghub_2k_corrected/Android/Android_2k.log create mode 100644 data/loghub_2k_corrected/Android/Android_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/Android/Android_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/Android/Android_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/Android/Android_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/Apache/Apache_2k.log create mode 100644 data/loghub_2k_corrected/Apache/Apache_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/Apache/Apache_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/Apache/Apache_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/Apache/Apache_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/BGL/BGL_2k.log create mode 100644 data/loghub_2k_corrected/BGL/BGL_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/BGL/BGL_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/BGL/BGL_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/BGL/BGL_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/HDFS/HDFS_2k.log create mode 100644 data/loghub_2k_corrected/HDFS/HDFS_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/HDFS/HDFS_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/HDFS/HDFS_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/HDFS/HDFS_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/HPC/HPC_2k.log create mode 100644 data/loghub_2k_corrected/HPC/HPC_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/HPC/HPC_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/HPC/HPC_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/HPC/HPC_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/Hadoop/Hadoop_2k.log create mode 100644 data/loghub_2k_corrected/Hadoop/Hadoop_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/Hadoop/Hadoop_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/Hadoop/Hadoop_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/Hadoop/Hadoop_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/HealthApp/HealthApp_2k.log create mode 100644 data/loghub_2k_corrected/HealthApp/HealthApp_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/HealthApp/HealthApp_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/HealthApp/HealthApp_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/HealthApp/HealthApp_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/Linux/Linux_2k.log create mode 100644 data/loghub_2k_corrected/Linux/Linux_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/Linux/Linux_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/Linux/Linux_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/Linux/Linux_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/Mac/Mac_2k.log create mode 100644 data/loghub_2k_corrected/Mac/Mac_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/Mac/Mac_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/Mac/Mac_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/Mac/Mac_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/OpenSSH/OpenSSH_2k.log create mode 100644 data/loghub_2k_corrected/OpenSSH/OpenSSH_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/OpenSSH/OpenSSH_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/OpenSSH/OpenSSH_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/OpenSSH/OpenSSH_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/OpenStack/OpenStack_2k.log create mode 100644 data/loghub_2k_corrected/OpenStack/OpenStack_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/OpenStack/OpenStack_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/OpenStack/OpenStack_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/OpenStack/OpenStack_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/Proxifier/Proxifier_2k.log create mode 100644 data/loghub_2k_corrected/Proxifier/Proxifier_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/Proxifier/Proxifier_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/Proxifier/Proxifier_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/Proxifier/Proxifier_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/Spark/Spark_2k.log create mode 100644 data/loghub_2k_corrected/Spark/Spark_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/Spark/Spark_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/Spark/Spark_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/Spark/Spark_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/Thunderbird/Thunderbird_2k.log create mode 100644 data/loghub_2k_corrected/Thunderbird/Thunderbird_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/Thunderbird/Thunderbird_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/Thunderbird/Thunderbird_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/Thunderbird/Thunderbird_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/Windows/Windows_2k.log create mode 100644 data/loghub_2k_corrected/Windows/Windows_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/Windows/Windows_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/Windows/Windows_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/Windows/Windows_2k.log_templates_corrected.csv create mode 100644 data/loghub_2k_corrected/Zookeeper/Zookeeper_2k.log create mode 100644 data/loghub_2k_corrected/Zookeeper/Zookeeper_2k.log_structured.csv create mode 100644 data/loghub_2k_corrected/Zookeeper/Zookeeper_2k.log_structured_corrected.csv create mode 100644 data/loghub_2k_corrected/Zookeeper/Zookeeper_2k.log_templates.csv create mode 100644 data/loghub_2k_corrected/Zookeeper/Zookeeper_2k.log_templates_corrected.csv create mode 100644 data/test_log/unknow.log delete mode 100644 demo/AEL_demo.py delete mode 100644 demo/LFA_demo.py delete mode 100644 demo/SLCT_demo.py delete mode 100644 demo/logmatch_demo.py delete mode 100644 docs/img/accuracy.png create mode 100644 docs/img/example.jpg delete mode 100644 docs/img/example.png delete mode 100644 docs/img/parsers.png create mode 100644 example/parse_your_own_logs.py create mode 100644 logparser/AEL/benchmark.py create mode 100644 logparser/AEL/demo.py create mode 100644 logparser/AEL/requirements.txt create mode 100644 logparser/Drain/benchmark.py rename demo/Drain_demo.py => logparser/Drain/demo.py (62%) create mode 100644 logparser/Drain/demo_result/HDFS_2k.log_structured.csv create mode 100644 logparser/Drain/demo_result/HDFS_2k.log_templates.csv create mode 100644 logparser/Drain/requirements.txt create mode 100644 logparser/IPLoM/benchmark.py rename demo/IPLoM_demo.py => logparser/IPLoM/demo.py (57%) create mode 100644 logparser/IPLoM/requirements.txt create mode 100644 logparser/LFA/benchmark.py create mode 100644 logparser/LFA/demo.py create mode 100644 logparser/LFA/requirements.txt create mode 100644 logparser/LKE/benchmark.py rename demo/LKE_demo.py => logparser/LKE/demo.py (51%) create mode 100644 logparser/LKE/requirements.txt delete mode 100644 logparser/LenMa/LenMa.py create mode 100644 logparser/LenMa/benchmark.py rename demo/LenMa_demo.py => logparser/LenMa/demo.py (51%) create mode 100644 logparser/LenMa/requirements.txt rename logparser/LenMa/{templateminer => src}/LICENSE (100%) create mode 100644 logparser/LenMa/src/LenMa.py rename logparser/LenMa/{templateminer => src}/__init__.py (100%) rename logparser/LenMa/{templateminer => src}/lenma_template.py (79%) rename logparser/LenMa/{templateminer => src}/template.py (65%) delete mode 100644 logparser/LogCluster/LogCluster.py create mode 100644 logparser/LogCluster/benchmark.py rename demo/LogCluster_demo.py => logparser/LogCluster/demo.py (53%) create mode 100644 logparser/LogCluster/requirements.txt create mode 100644 logparser/LogCluster/src/COPYING create mode 100644 logparser/LogCluster/src/LogCluster.py rename logparser/{MoLFI/main => LogCluster/src}/__init__.py (100%) rename logparser/LogCluster/{ => src}/logcluster.pl (100%) create mode 100644 logparser/LogMine/benchmark.py rename demo/LogMine_demo.py => logparser/LogMine/demo.py (59%) create mode 100644 logparser/LogMine/requirements.txt rename logparser/LogMine/{ => src}/LogMine.py (53%) rename logparser/{MoLFI/main/org => LogMine/src}/__init__.py (100%) rename logparser/LogMine/{ => src}/alignment.py (92%) create mode 100644 logparser/LogSig/benchmark.py rename demo/LogSig_demo.py => logparser/LogSig/demo.py (52%) create mode 100644 logparser/LogSig/requirements.txt delete mode 100644 logparser/MoLFI/MoLFI.py create mode 100644 logparser/MoLFI/benchmark.py rename demo/MoLFI_demo.py => logparser/MoLFI/demo.py (53%) delete mode 100644 logparser/MoLFI/setup.py create mode 100644 logparser/MoLFI/src/LICENSE rename logparser/MoLFI/{ => src}/Makefile (100%) create mode 100644 logparser/MoLFI/src/MoLFI.py rename logparser/MoLFI/{main/org/core => src}/__init__.py (100%) rename logparser/MoLFI/{ => src}/definitions.py (100%) rename logparser/MoLFI/{main/org/core/chromosome => src/main}/__init__.py (100%) rename logparser/MoLFI/{main/org/core/fitness => src/main/org}/__init__.py (100%) rename logparser/MoLFI/{main/org/core/metaheuristics => src/main/org/core}/__init__.py (100%) rename logparser/MoLFI/{main/org/core/operators => src/main/org/core/chromosome}/__init__.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/chromosome/chromosome.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/chromosome/template.py (100%) rename logparser/MoLFI/{main/org/core/post_process => src/main/org/core/fitness}/__init__.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/fitness/objectives2D.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/metaheuristics/NSGA_II_2D.py (100%) rename logparser/MoLFI/{main/org/core/utility => src/main/org/core/metaheuristics}/__init__.py (100%) rename logparser/MoLFI/{main/org/core/validation => src/main/org/core/operators}/__init__.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/operators/crossover.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/operators/mutation.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/operators/mutation_100cov.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/operators/selection.py (100%) rename logparser/MoLFI/{test => src/main/org/core/post_process}/__init__.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/post_process/post_process_chromosomes.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/utility/Chromosome_Generator.py (100%) rename logparser/MoLFI/{test/org => src/main/org/core/utility}/__init__.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/utility/chromosome_corrections.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/utility/log_file_reader.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/utility/log_message_adaptation.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/utility/match_utility.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/utility/message.py (100%) rename logparser/MoLFI/{test/org/core => src/main/org/core/validation}/__init__.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/validation/oracle.py (100%) rename logparser/MoLFI/{ => src}/main/org/core/validation/validate_chromosomes.py (100%) rename logparser/MoLFI/{ => src}/validation.py (100%) delete mode 100644 logparser/MoLFI/test/org/core/chromosome/test_chromosome.py delete mode 100644 logparser/MoLFI/test/org/core/chromosome/test_template.py delete mode 100644 logparser/MoLFI/test/org/core/fitness/__init__.py delete mode 100644 logparser/MoLFI/test/org/core/fitness/test_objectives2D.py delete mode 100644 logparser/MoLFI/test/org/core/operators/__init__.py delete mode 100644 logparser/MoLFI/test/org/core/operators/test_crossover.py delete mode 100644 logparser/MoLFI/test/org/core/operators/test_mutation.py delete mode 100644 logparser/MoLFI/test/org/core/operators/test_mutation_100cov.py delete mode 100644 logparser/MoLFI/test/org/core/post_process/__init__.py delete mode 100644 logparser/MoLFI/test/org/core/post_process/test_post_process_chromosome.py delete mode 100644 logparser/MoLFI/test/org/core/test_validation/__init__.py delete mode 100644 logparser/MoLFI/test/org/core/test_validation/test_oracle.py delete mode 100644 logparser/MoLFI/test/org/core/test_validation/test_validate_chromosome.py delete mode 100644 logparser/MoLFI/test/org/core/utility/__init__.py delete mode 100644 logparser/MoLFI/test/org/core/utility/test_chromosome_corrections.py delete mode 100644 logparser/MoLFI/test/org/core/utility/test_chromosome_generator.py delete mode 100644 logparser/MoLFI/test/org/core/utility/test_log_message_adaptation.py delete mode 100644 logparser/MoLFI/test/org/core/utility/test_match_utility.py delete mode 100644 logparser/MoLFI/test/org/core/utility/test_message.py delete mode 100644 logparser/MoLFI/test/resources/oracle_test.txt create mode 100644 logparser/SHISO/benchmark.py rename demo/SHISO_demo.py => logparser/SHISO/demo.py (53%) create mode 100644 logparser/SHISO/requirements.txt delete mode 100644 logparser/SLCT/SLCT.py create mode 100644 logparser/SLCT/benchmark.py create mode 100644 logparser/SLCT/demo.py create mode 100644 logparser/SLCT/requirements.txt create mode 100644 logparser/SLCT/src/COPYING create mode 100644 logparser/SLCT/src/SLCT.py rename logparser/{MoLFI/test/org/core/chromosome => SLCT/src}/__init__.py (100%) rename logparser/SLCT/{ => src}/cslct.c (100%) rename logparser/SLCT/{ => src}/cslct.h (100%) create mode 100644 logparser/Spell/benchmark.py rename demo/Spell_demo.py => logparser/Spell/demo.py (50%) create mode 100644 logparser/Spell/requirements.txt create mode 100644 logparser/logmatch/README.md create mode 100644 logparser/logmatch/demo.py create mode 100644 logparser/logmatch/requirements.txt create mode 100644 logparser/version.py create mode 100644 requirements.txt create mode 100644 tests/test_all.sh delete mode 100644 tests/test_py2.sh delete mode 100644 tests/test_py3.sh diff --git a/.gitignore b/.gitignore index 8ad09ebf..15a8045b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # Self-defined *result/ -slct # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/CITATION b/CITATION index 506b041e..777200bf 100644 --- a/CITATION +++ b/CITATION @@ -1,4 +1,4 @@ -@inproceedings{logparser, +@inproceedings{Logparser, author = {Jieming Zhu and Shilin He and Jinyang Liu and @@ -10,5 +10,17 @@ booktitle = {Proceedings of the 41st International Conference on Software Engineering: Software Engineering in Practice (ICSE)}, pages = {121--130}, - publisher = {{IEEE} / {ACM}}, - year = {2019}} \ No newline at end of file + year = {2019}} + +@inproceedings{DSN16, + author = {Pinjia He and + Jieming Zhu and + Shilin He and + Jian Li and + Michael R. Lyu}, + title = {An Evaluation Study on Log Parsing and Its Use in Log Mining}, + booktitle = {Annual {IEEE/IFIP} International Conference on Dependable Systems + and Networks (DSN)}, + pages = {654--661}, + year = {2016} +} \ No newline at end of file diff --git a/LICENSE b/LICENSE index 853c895d..cab27047 100644 --- a/LICENSE +++ b/LICENSE @@ -1,22 +1,308 @@ -MIT License - -Copyright (c) 2018-2023 LOGPAI Team - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + + Copyright (C) 2018-2023 The LOGPAI Members. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ----------------------------------------------------------------------- + This library contains some third-party components under other open + source licenses. This section summarizes their copyrights and licenses. + ----------------------------------------------------------------------- + + SLCT source code: + http://ristov.github.io/slct/ + + Copyright (C) 2003-2007 Risto Vaarandi + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + ----------------------------------------------------------------------- + + LogCluster source code: + https://github.com/ristov/logcluster + + Copyright (C) 2015-2019 Risto Vaarandi + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + ----------------------------------------------------------------------- + + LenMa source code: + https://github.com/keiichishima/templateminer + + Copyright (c) 2016, IIJ Innovation Institute, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ----------------------------------------------------------------------- + + MoLFI source code: + https://github.com/SalmaMessaoudi/MoLFI + + Copyright 2018-2022 University of Luxembourg + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ----------------------------------------------------------------------- + + LogMine alignment source code: + https://gist.github.com/aziele/6192a38862ce569fe1b9cbe377339fbe + + This software is a free software. Thus, it is licensed under GNU General + Public License. Python implementation to Smith-Waterman Algorithm for + Homework 1 of Bioinformatics class. + Forrest Bao, Sept. 26 diff --git a/README.md b/README.md index cf6dfb59..5251306e 100644 --- a/README.md +++ b/README.md @@ -1,79 +1,128 @@ -

+

+# Logparser -# Logparser -[![Documentation Status](https://readthedocs.org/projects/logparser/badge/?version=latest)](https://logparser.readthedocs.io/en/latest/?badge=latest) -[![license](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE.md) +
+Python version +Pypi version +Downloads +License +
+
-Logparser provides a toolkit and benchmarks for automated log parsing, which is a crucial step towards structured log analytics. By applying logparser, users can automatically learn event templates from unstructured logs and convert raw log messages into a sequence of structured events. In the literature, the process of log parsing is sometimes refered to as message template extraction, log key extraction, or log message clustering. +
+ +
-


An illustrative example of log parsing

+Logparser provides a machine learning toolkit and benchmarks for automated log parsing, which is a crucial step for structured log analytics. By applying logparser, users can automatically extract event templates from unstructured logs and convert raw log messages into a sequence of structured events. The process of log parsing is also known as message template extraction, log key extraction, or log message clustering in the literature. -:point_right: Read the docs: https://logparser.readthedocs.io +


An example of log parsing

-:telescope: If you use any of our tools or benchmarks in your research for publication, please kindly cite the following papers. -+ [**ICSE'19**] Jieming Zhu, Shilin He, Jinyang Liu, Pinjia He, Qi Xie, Zibin Zheng, Michael R. Lyu. [Tools and Benchmarks for Automated Log Parsing](https://arxiv.org/pdf/1811.03509.pdf). *International Conference on Software Engineering (ICSE)*, 2019. -+ [**DSN'16**] Pinjia He, Jieming Zhu, Shilin He, Jian Li, Michael R. Lyu. [An Evaluation Study on Log Parsing and Its Use in Log Mining](https://jiemingzhu.github.io/pub/pjhe_dsn2016.pdf). *IEEE/IFIP International Conference on Dependable Systems and Networks (DSN)*, 2016. +### 🌈 New updates + ++ Since the first release of logparser, many PRs and issues have been submitted due to incompatibility with Python 3. Finally, we update logparser v1.0.0 with support for Python 3. Thanks for all the contributions! ([#PR86](https://github.com/logpai/logparser/pull/86), [#PR85](https://github.com/logpai/logparser/pull/85), [#PR83](https://github.com/logpai/logparser/pull/83), [#PR80](https://github.com/logpai/logparser/pull/80), [#PR65](https://github.com/logpai/logparser/pull/65), [#PR57](https://github.com/logpai/logparser/pull/57), [#PR53](https://github.com/logpai/logparser/pull/53), [#PR52](https://github.com/logpai/logparser/pull/52), [#PR51](https://github.com/logpai/logparser/pull/51), [#PR49](https://github.com/logpai/logparser/pull/49), [#PR18](https://github.com/logpai/logparser/pull/18), [#PR22](https://github.com/logpai/logparser/pull/22)) ++ We build the logpai package wheel, which contains logparser as a submodule. Please install it via `pip install logpai`. ++ We refactor the code structure and beautify the code via the Python code formatter black. + +### Log parsers available: + +| Publication | Parser | Paper Reference | +| :---: | :---: | :--- | +| IPOM'03 | [SLCT](https://github.com/logpai/logparser/tree/main/logparser/SLCT#slct) | [A Data Clustering Algorithm for Mining Patterns from Event Logs](https://ristov.github.io/publications/slct-ipom03-web.pdf), by Risto Vaarandi. | +| QSIC'08 | [AEL](https://github.com/logpai/logparser/tree/main/logparser/AEL#ael) | [Abstracting Execution Logs to Execution Events for Enterprise Applications](https://www.researchgate.net/publication/4366728_Abstracting_Execution_Logs_to_Execution_Events_for_Enterprise_Applications_Short_Paper), by Zhen Ming Jiang, Ahmed E. Hassan, Parminder Flora, Gilbert Hamann. | +| KDD'09 | [IPLoM](https://github.com/logpai/logparser/tree/main/logparser/IPLoM#iplom) | [Clustering Event Logs Using Iterative Partitioning](https://web.cs.dal.ca/~makanju/publications/paper/kdd09.pdf), by Adetokunbo Makanju, A. Nur Zincir-Heywood, Evangelos E. Milios. | +| ICDM'09 | [LKE](https://github.com/logpai/logparser/tree/main/logparser/LKE#lke) | [Execution Anomaly Detection in Distributed Systems through Unstructured Log Analysis](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/DM790-CR.pdf), by Qiang Fu, Jian-Guang Lou, Yi Wang, Jiang Li. [**Microsoft**] | +| MSR'10 | [LFA](https://github.com/logpai/logparser/tree/main/logparser/LFA#lfa) | [Abstracting Log Lines to Log Event Types for Mining Software System Logs](http://www.se.rit.edu/~mei/publications/pdfs/Abstracting-Log-Lines-to-Log-Event-Types-for-Mining-Software-System-Logs.pdf), by Meiyappan Nagappan, Mladen A. Vouk. | +| CIKM'11 | [LogSig](https://github.com/logpai/logparser/tree/main/logparser/LogSig#logsig) | [LogSig: Generating System Events from Raw Textual Logs](https://users.cs.fiu.edu/~taoli/pub/liang-cikm2011.pdf), by Liang Tang, Tao Li, Chang-Shing Perng. | +| SCC'13 | [SHISO](https://github.com/logpai/logparser/tree/main/logparser/SHISO#shiso) | [Incremental Mining of System Log Format](http://ieeexplore.ieee.org/document/6649746/), by Masayoshi Mizutani. | +| CNSM'15 | [LogCluster](https://github.com/logpai/logparser/tree/main/logparser/LogCluster#logcluster) | [LogCluster - A Data Clustering and Pattern Mining Algorithm for Event Logs](http://dl.ifip.org/db/conf/cnsm/cnsm2015/1570161213.pdf), by Risto Vaarandi, Mauno Pihelgas. | +| CNSM'15 | [LenMa](https://github.com/logpai/logparser/tree/main/logparser/LenMa#lenma) | [Length Matters: Clustering System Log Messages using Length of Words](https://arxiv.org/pdf/1611.03213.pdf), by Keiichi Shima. | +| CIKM'16 | [LogMine](https://github.com/logpai/logparser/tree/main/logparser/LogMine#logmine) | [LogMine: Fast Pattern Recognition for Log Analytics](http://www.cs.unm.edu/~mueen/Papers/LogMine.pdf), by Hossein Hamooni, Biplob Debnath, Jianwu Xu, Hui Zhang, Geoff Jiang, Adbullah Mueen. [**NEC**] | +| ICDM'16 | [Spell](https://github.com/logpai/logparser/tree/main/logparser/Spell#spell) | [Spell: Streaming Parsing of System Event Logs](https://www.cs.utah.edu/~lifeifei/papers/spell.pdf), by Min Du, Feifei Li. | +| ICWS'17 | [Drain](https://github.com/logpai/logparser/tree/main/logparser/Drain#drain) | [Drain: An Online Log Parsing Approach with Fixed Depth Tree](https://jiemingzhu.github.io/pub/pjhe_icws2017.pdf), by Pinjia He, Jieming Zhu, Zibin Zheng, and Michael R. Lyu.| +| ICPC'18 | [MoLFI](https://github.com/logpai/logparser/tree/main/logparser/MoLFI#molfi) | [A Search-based Approach for Accurate Identification of Log Message Formats](http://publications.uni.lu/bitstream/10993/35286/1/ICPC-2018.pdf), by Salma Messaoudi, Annibale Panichella, Domenico Bianculli, Lionel Briand, Raimondas Sasnauskas. | + +:bulb: Welcome to submit a PR to push your parser code to logparser and add your paper to the table. + +### Installation + +We recommend installing the logparser package and requirements via pypi. -### Log parsers currently available: - -| Tools | References | -| :--- | :--- | -| SLCT | [**IPOM'03**] [A Data Clustering Algorithm for Mining Patterns from Event Logs](http://www.quretec.com/u/vilo/edu/2003-04/DM_seminar_2003_II/ver1/P12/slct-ipom03-web.pdf), by Risto Vaarandi. | -| AEL | [**QSIC'08**] [Abstracting Execution Logs to Execution Events for Enterprise Applications](https://www.researchgate.net/publication/4366728_Abstracting_Execution_Logs_to_Execution_Events_for_Enterprise_Applications_Short_Paper), by Zhen Ming Jiang, Ahmed E. Hassan, Parminder Flora, Gilbert Hamann.
[**JSME'08**] [An Automated Approach for Abstracting Execution Logs to Execution Events](http://www.cse.yorku.ca/~zmjiang/publications/jsme2008.pdf), by Zhen Ming Jiang, Ahmed E. Hassan, Gilbert Hamann, Parminder Flora. | -| IPLoM | [**KDD'09**] [Clustering Event Logs Using Iterative Partitioning](https://web.cs.dal.ca/~makanju/publications/paper/kdd09.pdf), by Adetokunbo Makanju, A. Nur Zincir-Heywood, Evangelos E. Milios.
[**TKDE'12**] [A Lightweight Algorithm for Message Type Extraction in System Application Logs](http://ieeexplore.ieee.org/abstract/document/5936060/), by Adetokunbo Makanju, A. Nur Zincir-Heywood, Evangelos E. Milios. | -| LKE | [**ICDM'09**] [Execution Anomaly Detection in Distributed Systems through Unstructured Log Analysis](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/DM790-CR.pdf), by Qiang Fu, Jian-Guang Lou, Yi Wang, Jiang Li. [**Microsoft**] | -| LFA | [**MSR'10**] [Abstracting Log Lines to Log Event Types for Mining Software System Logs](http://www.se.rit.edu/~mei/publications/pdfs/Abstracting-Log-Lines-to-Log-Event-Types-for-Mining-Software-System-Logs.pdf), by Meiyappan Nagappan, Mladen A. Vouk. | -| LogSig | [**CIKM'11**] [LogSig: Generating System Events from Raw Textual Logs](https://users.cs.fiu.edu/~taoli/pub/liang-cikm2011.pdf), by Liang Tang, Tao Li, Chang-Shing Perng. | -| SHISO | [**SCC'13**] [Incremental Mining of System Log Format](http://ieeexplore.ieee.org/document/6649746/), by Masayoshi Mizutani. | -| LogCluster | [**CNSM'15**] [LogCluster - A Data Clustering and Pattern Mining Algorithm for Event Logs](http://dl.ifip.org/db/conf/cnsm/cnsm2015/1570161213.pdf), by Risto Vaarandi, Mauno Pihelgas. | -| LenMa | [**CNSM'15**] [Length Matters: Clustering System Log Messages using Length of Words](https://arxiv.org/pdf/1611.03213.pdf), by Keiichi Shima. | -| LogMine | [**CIKM'16**] [LogMine: Fast Pattern Recognition for Log Analytics](http://www.cs.unm.edu/~mueen/Papers/LogMine.pdf), by Hossein Hamooni, Biplob Debnath, Jianwu Xu, Hui Zhang, Geoff Jiang, Adbullah Mueen. [**NEC**] | -| Spell | [**ICDM'16**] [Spell: Streaming Parsing of System Event Logs](https://www.cs.utah.edu/~lifeifei/papers/spell.pdf), by Min Du, Feifei Li. | -| Drain | [**ICWS'17**] [Drain: An Online Log Parsing Approach with Fixed Depth Tree](https://jiemingzhu.github.io/pub/pjhe_icws2017.pdf), by Pinjia He, Jieming Zhu, Zibin Zheng, and Michael R. Lyu.
[IBM-Drain3](https://github.com/IBM/Drain3): IBM's upgrade version of Drain in Python 3.6 with additional features. | -| MoLFI | [**ICPC'18**] [A Search-based Approach for Accurate Identification of Log Message Formats](http://publications.uni.lu/bitstream/10993/35286/1/ICPC-2018.pdf), by Salma Messaoudi, Annibale Panichella, Domenico Bianculli, Lionel Briand, Raimondas Sasnauskas. | +``` +pip install logpai==logparserv1.0.0 +``` + +In particular, the package depends on the following requirements. + ++ Python 3.6+ ++ regex 2022.3.2 ++ numpy ++ pandas ++ scipy ++ deap (if using logparser.MoLFI) ++ gcc (if using logparser.SLCT) ### Get started -Code organization: +1. Run the demo: + + For each log parser, we provide a demo to help you get started. Each demo shows the basic usage of a target log parser and the hyper-parameters to configure. For example, the following command shows how to run the demo for Drain. + + ``` + cd logparser/Drain + python demo.py + ``` + After finishing running the demo, you can obtain extracted event templates and parsed structured logs in the result folder. -+ [benchmark](./benchmark): the benchmark scripts to reproduce the evaluation results of log parsing -+ [demo](./demo): the demo files to show how to run logparser on HDFS logs. -+ [logparser](./logparser): the logparser package -+ [logs](./logs): Some log samples and manually parsed structured logs with their templates (ground truth). + + [HDFS_2k.log_templates.csv](https://github.com/logpai/logparser/blob/main/logparser/Drain/demo_result/HDFS_2k.log_templates.csv) + + [HDFS_2k.log_structured.csv](https://github.com/logpai/logparser/blob/main/logparser/Drain/demo_result/HDFS_2k.log_structured.csv) -Please follow the [installation steps](https://logparser.readthedocs.io/en/latest/installation/dependency.html) and [demo](https://logparser.readthedocs.io/en/latest/demo.html) in the docs to get started. +2. Run the benchmark: + + For each log parser, we provide a benchmark script to run log parsing on the [loghub_2k datasets](https://github.com/logpai/logparser/tree/main/data#loghub_2k) for evaluating parsing accuarcy. You can also use [other benchmark datasets for log parsing](https://github.com/logpai/logparser/tree/main/data#datasets). -### Benchmarking results -All the log parsers have been evaluated across 16 different logs available in [loghub](https://github.com/logpai/loghub). We report parsing accuracy as the percentage of accurately parsed log messages. To reproduce the experimental results, please run the [benchmark](./benchmark) scripts. + ``` + cd logparser/Drain + python benchmark.py + ``` -

+3. Parse your own logs: -
- :point_down: Check the detailed bechmarking result table (click to expand) - -

- - In the table, accuracy values above 0.9 are marked in bold, and the best accuracy results achieved are marked with \*. Some of the accuracy values may be lower than what have been reported by previous studies (e.g., Drain, LogMine). The reasons are two-fold: 1) We use a more rigorous accuracy metric which rejects events that are only partially matched. 2) For fairness of comparison, we apply only a few preprocessing regular expressions (e.g., IP or number replacement) to each log parser. Adding more preprocessing rules can boost parsing accuracy, but requires more manual efforts as well. + It is easy to apply logparser to parsing your own log data. To do so, you need to install the logpai package first. Then you can develop your own script following the below code snippet to start log parsing. -
+ ```python + from logparser.Drain import LogParser + input_dir = 'PATH_TO_LOGS/' # The input directory of log file + output_dir = 'result/' # The output directory of parsing results + log_file = 'unknow.log' # The input log file name + log_format = '