Comments (3)
thanks for your contribution, looks good, Will review, build and merge soon your PR
from modsecurity-parser.
Seems the normalize must be True
Otherwise for bigger files there is an exception like below:
inputFileName : modsec3/modsec_audit.log ---------- modsec_audit events processed: 577 ---------- ---------- modsec_audit events skipped by INCLUDED/EXCLUDED options or INVALID : 0 ---------- Traceback (most recent call last): File "modsecurity-parser3.py", line 689, in <module> outputWithGraphs = modsecViewGraphs(modsec_entries) File "modsecurity-parser3.py", line 454, in modsecViewGraphs patches, texts, autotexts = plt.pie(intercepted_cnt_top10.values(), autopct='%1.1f%%', shadow=True, startangle=90, radius=1.0, normalize=False) File "/usr/local/lib/python3.8/dist-packages/matplotlib/pyplot.py", line 2827, in pie return gca().pie( File "/usr/local/lib/python3.8/dist-packages/matplotlib/__init__.py", line 1438, in inner return func(ax, *map(sanitize_sequence, args), **kwargs) File "/usr/local/lib/python3.8/dist-packages/matplotlib/axes/_axes.py", line 3018, in pie raise ValueError('Cannot plot an unnormalized pie with sum(x) > 1') ValueError: Cannot plot an unnormalized pie with sum(x) > 1
and charts are not created. When normalize=True everything works without warning and charts are generated.
I checked that for modsec_audit.log traditional and json version. Also modsecurity3 logs behave in the same way.
I have added that with the newest PR which is already merged.
from modsecurity-parser.
Ok, good to know, I'm manually closing the issue.
from modsecurity-parser.
Related Issues (20)
- Error TypeError: pie() got an unexpected keyword argument 'normalize' HOT 4
- No modsecurity events found in the specified file HOT 3
- ValueError: Single argument to subplot must be a three-digit integer, not AxesSubplot(0.125,0.420962;0.149038x0.148077) HOT 2
- IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed HOT 1
- Graph error HOT 8
- Png Graph not show rule id HOT 4
- Doesn't work with python 3.11 on Wondows 10/11 with matplotlib > 3.3
- LogParts Setting HOT 2
- File config.yaml.example for global settings
- in Detection only mode on hapee-2.4/libmodsecurity3 no rules are displayed in the report HOT 5
- IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed HOT 5
- --version3 and libmodsecurity 3 parsing exceptions HOT 1
- ValueError: time data
- ValueError: Single argument to subplot must be a three-digit integer, not <Axes: > HOT 2
- Generate rsyslog/nxlog compatible paersed log file per minute to get a near real time view ? HOT 5
- incorrect HELP=Yes parameters
- TypeError: 'set' object does not support indexing HOT 1
- Time format HOT 3
- Json not vaild HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modsecurity-parser.