From 41bffb5d7d7ef993d98473f351395dad73f4ea35 Mon Sep 17 00:00:00 2001
From: luiscal4a <l.delacal@alumnos.upm.es>
Date: Wed, 19 Oct 2022 01:28:07 +0200
Subject: [PATCH] Change the description of the monitored KPIs in the
 Centralized Attack Detector component

---
 ...3_centralizedattackdetectorServiceServicerImpl.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py
index f35adfda6..37fa9ce53 100644
--- a/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py
+++ b/src/l3_centralizedattackdetector/service/l3_centralizedattackdetectorServiceServicerImpl.py
@@ -62,7 +62,7 @@ class l3_centralizedattackdetectorServiceServicerImpl(L3Centralizedattackdetecto
 
     def create_predicted_class_kpi(self, client: MonitoringClient, service_id):
         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.kpi_sample_type = KpiSampleType.KPISAMPLETYPE_UNKNOWN
         new_kpi = client.SetKpi(kpi_description)
@@ -73,7 +73,7 @@ class l3_centralizedattackdetectorServiceServicerImpl(L3Centralizedattackdetecto
 
     def create_class_prob_kpi(self, client: MonitoringClient, service_id):
         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.kpi_sample_type = KpiSampleType.KPISAMPLETYPE_UNKNOWN
         new_kpi = client.SetKpi(kpi_description)
@@ -184,11 +184,11 @@ class l3_centralizedattackdetectorServiceServicerImpl(L3Centralizedattackdetecto
 
             try:
                 """with grpc.insecure_channel("192.168.165.78:10002") as channel:
-                    stub = L3AttackmitigatorStub(channel)         
-                    logging.info("Sending the connection information to the Attack Mitigator component...")
-                    response = stub.SendOutput(output)"""
+                stub = L3AttackmitigatorStub(channel)
+                logging.info("Sending the connection information to the Attack Mitigator component...")
+                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)
                 logging.info(
                     "Attack Mitigator notified and received response: ", response.message
-- 
GitLab