def ErrorCriteria(errors):
 ERROR_ALERT_THRESHOLD = 5
 alerts = []
 warnings = []
 if (errors['cluster_total'] > ERROR_ALERT_THRESHOLD):
  alerts.append(CLUSTER_TOKEN)
 elif (errors['cluster_total'] > 0):
  warnings.append(CLUSTER_TOKEN)
 return (alerts, warnings)

def ErrorCriteria ( errors ) : ERROR_ALERT_THRESHOLD = 5 alerts = [ ] warnings = [ ] if ( errors [ 'cluster_total' ] > ERROR_ALERT_THRESHOLD ) : alerts . append ( CLUSTER_TOKEN ) elif ( errors [ 'cluster_total' ] > 0 ) : warnings . append ( CLUSTER_TOKEN ) return ( alerts , warnings )
monitor the number of unexpected errors logged in the cluster .