From: diazb Date: Fri, 18 May 2018 22:25:51 +0000 (-0300) Subject: Adds more alarm parameters to alarm notification log X-Git-Tag: v4.0.0~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=822fb1930b4abdf834462d0cd26247b0960dcac0;p=osm%2FMON.git Adds more alarm parameters to alarm notification log Signed-off-by: diazb --- diff --git a/policy_module/osm_policy_module/core/agent.py b/policy_module/osm_policy_module/core/agent.py index 60da337..a38feeb 100644 --- a/policy_module/osm_policy_module/core/agent.py +++ b/policy_module/osm_policy_module/core/agent.py @@ -95,7 +95,21 @@ class PolicyModuleAgent: if message.key == 'notify_alarm': content = json.loads(message.value) alarm_id = content['notify_details']['alarm_uuid'] - log.info("Received alarm notification for alarm %s", alarm_id) + metric_name = content['notify_details']['metric_name'] + operation = content['notify_details']['operation'] + threshold = content['notify_details']['threshold_value'] + vdu_name = content['notify_details']['vdu_name'] + vnf_member_index = content['notify_details']['vnf_member_index'] + ns_id = content['notify_details']['ns_id'] + log.info( + "Received alarm notification for alarm %s, \ + metric %s, \ + operation %s, \ + threshold %s, \ + vdu_name %s, \ + vnf_member_index %s, \ + ns_id %s ", + alarm_id, metric_name, operation, threshold, vdu_name, vnf_member_index, ns_id) try: alarm = ScalingAlarm.select().where(ScalingAlarm.alarm_id == alarm_id).get() lcm_client = LcmClient()