Receiving Errors in logs while trying to use Evaluation Script for populating Additional field in Summary of Alert mail.Same is working perfectly fine for few alerts.

Receiving Errors in logs while trying to use Evaluation Script for populating Additional field in Summary of Alert mail.Same is working perfectly fine for few alerts.

  • Refer Below Evaluation Script Used to populate Additional field from BMV to Summary of Alert Mail.

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’


Error Logs - 

Reference to Vusmartmaps logs for errors

ANS New release, we don’t need to define get_vumetric_value() in the evaluation criteria remove the function part from this and try again? It should be from “RESULT = False”

removed the block above “RESULT = Faslse” and it started working