Skip to content
Snippets Groups Projects
Commit 41bffb5d authored by delacal's avatar delacal
Browse files

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!142Release TeraFlowSDN 2.1,!93Updated L3 components + scalability
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment