def get_vumetric_value(metric_dict, vuMetricName, metricName):
if not metric_dict:
return None
if vuMetricName not in metric_dict:
return None
if ‘metrics’ not in metric_dict[vuMetricName]:
return None
if metricName not in metric_dict[vuMetricName][‘metrics’]:
return None
if ‘value’ not in metric_dict[vuMetricName][‘metrics’][metricName]:
return None
if metric_dict[vuMetricName][‘metrics’][metricName][‘value’] == “N.A.”:
return None
return metric_dict[vuMetricName][‘metrics’][metricName][‘value’]
RESULT = False
R1 = get_vumetric_value(D[0], ‘CIB Login Count 30 mins’, ‘Login count in last 30 mins’)
if R1==0:
RESULT=True
add_fields=D[0][‘CIB Login Count 30 mins’][‘metrics’][‘Login count in last 30 mins’][‘includes’]
value1 = add_fields.get(‘Application’,”NA”)
DYNAMIC_FIELDS[‘summary’] = ‘Login count in last 30 mins ‘+str(value1)+’ %S’