parameters: (self,action_obj,action_operation_obj,host_id,trigger_data)
docstring: sending alert email to who concerns.
          :param action_obj: 触发这个报警的action对象
          :param action_operation_obj: 要报警的动作对象
          :param host_id: 要报警的目标主机
          :param trigger_data: 要报警的数据
          :return:
docstring_summary: sending alert email to who concerns.
          :param action_obj: 触发这个报警的action对象
          :param action_operation_obj: 要报警的动作对象
          :param host_id: 要报警的目标主机
          :param trigger_data: 要报警的数据
          :return:
docstring_tokens: sending alert email to who concerns . : param action_obj : 触发这个报警的action对象 : param action_operation_obj : 要报警的动作对象 : param host_id : 要报警的目标主机 : param trigger_data : 要报警的数据 : return :
function: def action_email(self,action_obj,action_operation_obj,host_id,trigger_data):
          '''
          sending alert email to who concerns.
          :param action_obj: 触发这个报警的action对象
          :param action_operation_obj: 要报警的动作对象
          :param host_id: 要报警的目标主机
          :param trigger_data: 要报警的数据
          :return:
          '''
  
          print("要发报警的数据:",self.alert_counter_dic[action_obj.id][host_id])
          print("action email:",action_operation_obj.action_type,action_operation_obj.notifiers,trigger_data)
          notifier_mail_list = [obj.email for obj in action_operation_obj.notifiers.all()]
          subject = '级别:%s -- 主机:%s -- 服务:%s' %(trigger_data.get('trigger_id'),
                                                trigger_data.get('host_id'),
                                                trigger_data.get('service_item'))
  
          send_mail(
              subject,
              action_operation_obj.msg_format,
              settings.DEFAULT_FROM_EMAIL,
              notifier_mail_list,
          )
function_tokens: def action_email ( self , action_obj , action_operation_obj , host_id , trigger_data ) : print ( "要发报警的数据:",self.alert_co u nter _ dic[action_obj.id ] [host_id]) print ( "action email:" , action_operation_obj . action_type , action_operation_obj . notifiers , trigger_data ) notifier_mail_list = [ obj . email for obj in action_operation_obj . notifiers . all ( ) ] subject = '级别:%s -- 主机:%s -- 服务:%s' %(trigger_d t a .get('trigge r _id ' ), trigger_data . get ( 'host_id' ) , trigger_data . get ( 'service_item' ) ) send_mail ( subject , action_operation_obj . msg_format , settings . DEFAULT_FROM_EMAIL , notifier_mail_list , )