├── images ├── grafana.jpeg ├── influxdb.jpeg ├── web_log_anlyzst.jpg ├── structure_of_the_data.png └── nginx_log_processing_monitoring.png ├── .github └── ISSUE_TEMPLATE │ ├── custom.md │ ├── feature_request.md │ └── bug_report.md ├── .editorconfig ├── LICENSE ├── script ├── log_distribution.py ├── analyzer_threading.py └── analyzer_multiprocessing.py ├── .gitignore └── README.md /images/grafana.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EscapeLife/web-log-analyst/HEAD/images/grafana.jpeg -------------------------------------------------------------------------------- /images/influxdb.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EscapeLife/web-log-analyst/HEAD/images/influxdb.jpeg -------------------------------------------------------------------------------- /images/web_log_anlyzst.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EscapeLife/web-log-analyst/HEAD/images/web_log_anlyzst.jpg -------------------------------------------------------------------------------- /images/structure_of_the_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EscapeLife/web-log-analyst/HEAD/images/structure_of_the_data.png -------------------------------------------------------------------------------- /images/nginx_log_processing_monitoring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EscapeLife/web-log-analyst/HEAD/images/nginx_log_processing_monitoring.png -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # setting for all files 5 | [*] 6 | # character set 7 | charset = utf-8 8 | # indented style 9 | end_of_line = lf 10 | # whether to insert a blank line at the end of a file 11 | insert_final_newline = true 12 | # whether to delete the space at the end of a line 13 | trim_trailing_whitespace = false 14 | 15 | # python 16 | [*.py] 17 | indent_style = space 18 | indent_size = 4 19 | 20 | # shell 21 | [*.sh] 22 | indent_style = space 23 | indent_size = 4 24 | 25 | # javascript 26 | [*.js] 27 | indent_style = space 28 | indent_size = 2 29 | 30 | # makefile 31 | [*.md] 32 | indent_style = tab 33 | 34 | # json or .travis.yml 35 | [*.json] 36 | indent_style = space 37 | indent_size = 2 38 | 39 | # yml 40 | [*.yml}] 41 | indent_style = space 42 | indent_size = 2 43 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | **Describe the bug** 8 | A clear and concise description of what the bug is. 9 | 10 | **To Reproduce** 11 | Steps to reproduce the behavior: 12 | 1. Go to '...' 13 | 2. Click on '....' 14 | 3. Scroll down to '....' 15 | 4. See error 16 | 17 | **Expected behavior** 18 | A clear and concise description of what you expected to happen. 19 | 20 | **Screenshots** 21 | If applicable, add screenshots to help explain your problem. 22 | 23 | **Desktop (please complete the following information):** 24 | - OS: [e.g. iOS] 25 | - Browser [e.g. chrome, safari] 26 | - Version [e.g. 22] 27 | 28 | **Smartphone (please complete the following information):** 29 | - Device: [e.g. iPhone6] 30 | - OS: [e.g. iOS8.1] 31 | - Browser [e.g. stock browser, safari] 32 | - Version [e.g. 22] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Escape 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /script/log_distribution.py: -------------------------------------------------------------------------------- 1 | import re 2 | import random 3 | import datetime 4 | import threading 5 | 6 | 7 | def read_log(path): 8 | with open(path) as f: 9 | for line in f: 10 | yield line 11 | 12 | 13 | def parse(path): 14 | o = re.compile(r'(?P\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) .* .* \[(?P