Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mentat-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
713
Mentat
mentat-test
Commits
83de608a
Commit
83de608a
authored
3 years ago
by
Rajmund Hruška
Browse files
Options
Downloads
Plain Diff
Merge branch 'hruska-bugfix-#7501-ipv6' into devel
parents
6c3fe357
f4b3beee
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/mentat/stats/idea.py
+3
-3
3 additions, 3 deletions
lib/mentat/stats/idea.py
lib/mentat/stats/test_idea.py
+6
-4
6 additions, 4 deletions
lib/mentat/stats/test_idea.py
with
9 additions
and
7 deletions
lib/mentat/stats/idea.py
+
3
−
3
View file @
83de608a
...
...
@@ -90,7 +90,7 @@ LIST_STAT_GROUPS = (
"""
List of statistical groups. The statistics will be calculated separatelly for these.
"""
LIST_AGGREGATIONS
=
(
[
ST_SKEY_IPS
,
(
'
Source.IP4
'
,
),
KEY_UNKNOWN
],
[
ST_SKEY_IPS
,
(
'
Source.IP4
'
,
'
Source.IP6
'
),
KEY_UNKNOWN
],
#[ST_SKEY_IP4S, ('Source.IP4',), KEY_UNKNOWN],
#[ST_SKEY_IP6S, ('Source.IP6',), KEY_UNKNOWN],
[
ST_SKEY_ANALYZERS
,
(
'
Node[#].SW
'
,),
KEY_UNKNOWN
],
...
...
@@ -820,9 +820,9 @@ def _include_event_to_stats(stats, event, recurring = False, skip = None):
if
skip
and
rule
[
0
]
in
skip
:
continue
values
=
[]
for
jpath
in
rule
[
1
]:
values
=
jpath_values
(
event
,
jpath
)
if
values
:
break
values
=
values
+
jpath_values
(
event
,
jpath
)
reg
[
rule
[
0
]]
=
values
if
not
values
:
...
...
This diff is collapsed.
Click to expand it.
lib/mentat/stats/test_idea.py
+
6
−
4
View file @
83de608a
...
...
@@ -397,7 +397,8 @@ class TestMentatStatsIdea(unittest.TestCase):
'
192.168.0.2-192.168.0.5
'
:
3
,
'
192.168.0.200
'
:
1
,
'
192.172.0.109
'
:
1
,
'
192.172.0.200
'
:
1
'
192.172.0.200
'
:
1
,
'
2001:db8::ff00:42:0/112
'
:
3
},
'
list_ids
'
:
[
'
msg01
'
,
'
msg02
'
,
'
msg03
'
,
'
msg04
'
,
'
msg05
'
,
'
msg06
'
],
'
severities
'
:
{
'
__unknown__
'
:
6
}
...
...
@@ -427,7 +428,7 @@ class TestMentatStatsIdea(unittest.TestCase):
'
detectorsws
'
:
{
'
__REST__
'
:
3
,
'
cz.cesnet.holly/Beekeeper
'
:
1
,
'
org.example.kippo/Kippo
'
:
2
},
'
ips
'
:
{
'
192.168.0.0/25
'
:
3
,
'
192.168.0.2-192.168.0.5
'
:
3
,
'
__REST__
'
:
6
},
'
ips
'
:
{
'
192.168.0.0/25
'
:
3
,
'
192.168.0.2-192.168.0.5
'
:
3
,
'
__REST__
'
:
9
},
'
severities
'
:
{
'
__unknown__
'
:
6
}
}
)
...
...
@@ -455,7 +456,7 @@ class TestMentatStatsIdea(unittest.TestCase):
'
org.example.dionaea/Kippo
'
:
1
,
'
org.example.kippo/Kippo
'
:
2
,
'
org.example.labrea/LaBrea
'
:
1
},
'
ips
'
:
{
'
192.168.0.0/25
'
:
3
,
'
__REST__
'
:
9
},
'
ips
'
:
{
'
192.168.0.0/25
'
:
3
,
'
__REST__
'
:
12
},
'
severities
'
:
{
'
__unknown__
'
:
6
}
}
)
...
...
@@ -696,7 +697,8 @@ class TestMentatStatsIdea(unittest.TestCase):
'
192.168.0.2-192.168.0.5
'
:
9
,
'
192.168.0.200
'
:
3
,
'
192.172.0.109
'
:
3
,
'
192.172.0.200
'
:
3
},
'
192.172.0.200
'
:
3
,
'
2001:db8::ff00:42:0/112
'
:
9
},
'
severities
'
:
{
'
__unknown__
'
:
18
}
}
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment