Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
controller
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TFS
controller
Commits
41bffb5d
Commit
41bffb5d
authored
2 years ago
by
delacal
Browse files
Options
Downloads
Patches
Plain Diff
Change the description of the monitored KPIs in the Centralized Attack Detector component
parent
6edc9d28
No related branches found
No related tags found
2 merge requests
!142
Release TeraFlowSDN 2.1
,
!93
Updated L3 components + scalability
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py
+6
-6
6 additions, 6 deletions
...ervice/l3_centralizedattackdetectorServiceServicerImpl.py
with
6 additions
and
6 deletions
src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py
+
6
−
6
View file @
41bffb5d
...
@@ -62,7 +62,7 @@ class l3_centralizedattackdetectorServiceServicerImpl(L3Centralizedattackdetecto
...
@@ -62,7 +62,7 @@ class l3_centralizedattackdetectorServiceServicerImpl(L3Centralizedattackdetecto
def
create_predicted_class_kpi
(
self
,
client
:
MonitoringClient
,
service_id
):
def
create_predicted_class_kpi
(
self
,
client
:
MonitoringClient
,
service_id
):
kpi_description
:
KpiDescriptor
=
KpiDescriptor
()
kpi_description
:
KpiDescriptor
=
KpiDescriptor
()
kpi_description
.
kpi_description
=
"
L3 security status of
service {}
"
.
format
(
service_id
)
kpi_description
.
kpi_description
=
"
Cryptomining Detector Predicted Class (
service
:
{}
)
"
.
format
(
service_id
)
kpi_description
.
service_id
.
service_uuid
.
uuid
=
service_id
.
service_uuid
.
uuid
kpi_description
.
service_id
.
service_uuid
.
uuid
=
service_id
.
service_uuid
.
uuid
kpi_description
.
kpi_sample_type
=
KpiSampleType
.
KPISAMPLETYPE_UNKNOWN
kpi_description
.
kpi_sample_type
=
KpiSampleType
.
KPISAMPLETYPE_UNKNOWN
new_kpi
=
client
.
SetKpi
(
kpi_description
)
new_kpi
=
client
.
SetKpi
(
kpi_description
)
...
@@ -73,7 +73,7 @@ class l3_centralizedattackdetectorServiceServicerImpl(L3Centralizedattackdetecto
...
@@ -73,7 +73,7 @@ class l3_centralizedattackdetectorServiceServicerImpl(L3Centralizedattackdetecto
def
create_class_prob_kpi
(
self
,
client
:
MonitoringClient
,
service_id
):
def
create_class_prob_kpi
(
self
,
client
:
MonitoringClient
,
service_id
):
kpi_description
:
KpiDescriptor
=
KpiDescriptor
()
kpi_description
:
KpiDescriptor
=
KpiDescriptor
()
kpi_description
.
kpi_description
=
"
L3 security status of
service {}
"
.
format
(
service_id
)
kpi_description
.
kpi_description
=
"
Cryptomining Detector Prediction (
service
:
{}
)
"
.
format
(
service_id
)
kpi_description
.
service_id
.
service_uuid
.
uuid
=
service_id
.
service_uuid
.
uuid
kpi_description
.
service_id
.
service_uuid
.
uuid
=
service_id
.
service_uuid
.
uuid
kpi_description
.
kpi_sample_type
=
KpiSampleType
.
KPISAMPLETYPE_UNKNOWN
kpi_description
.
kpi_sample_type
=
KpiSampleType
.
KPISAMPLETYPE_UNKNOWN
new_kpi
=
client
.
SetKpi
(
kpi_description
)
new_kpi
=
client
.
SetKpi
(
kpi_description
)
...
@@ -184,11 +184,11 @@ class l3_centralizedattackdetectorServiceServicerImpl(L3Centralizedattackdetecto
...
@@ -184,11 +184,11 @@ class l3_centralizedattackdetectorServiceServicerImpl(L3Centralizedattackdetecto
try
:
try
:
"""
with grpc.insecure_channel(
"
192.168.165.78:10002
"
) as channel:
"""
with grpc.insecure_channel(
"
192.168.165.78:10002
"
) as channel:
stub = L3AttackmitigatorStub(channel)
stub = L3AttackmitigatorStub(channel)
logging.info(
"
Sending the connection information to the Attack Mitigator component...
"
)
logging.info(
"
Sending the connection information to the Attack Mitigator component...
"
)
response = stub.SendOutput(output)
"""
response = stub.SendOutput(output)
"""
logging
.
info
(
"
Sending the connection information to the Attack Mitigator component...
"
)
logging
.
info
(
"
Sending the connection information to the Attack Mitigator component...
"
)
response
=
self
.
attackmitigator_client
.
SendOutput
(
output
)
response
=
self
.
attackmitigator_client
.
SendOutput
(
output
)
logging
.
info
(
logging
.
info
(
"
Attack Mitigator notified and received response:
"
,
response
.
message
"
Attack Mitigator notified and received response:
"
,
response
.
message
...
...
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