class_docstr: VictorOpsOutput handles all alert dispatching for VictorOps
docstr: Send alert to VictorOps
  
  Publishing:
      By default this output sends the current publication to VictorOps.
      There is no "magic" field to "override" it: Simply publish what you want to send!
  
  Args:
      alert (Alert): Alert instance which triggered a rule
      descriptor (str): Output descriptor
  
  Returns:
      bool: True if alert was sent successfully, False otherwise
docstr_tok: ["Send","alert","to","VictorOps","Publishing",":","By","default","this","output","sends","the","current","publication","to","VictorOps",".","There","is","no","``","magic","''","field","to","``","override","''","it",":","Simply","publish","what","you","want","to","send","!","Args",":","alert","(","Alert",")",":","Alert","instance","which","triggered","a","rule","descriptor","(","str",")",":","Output","descriptor","Returns",":","bool",":","True","if","alert","was","sent","successfully",",","False","otherwise"]
code: def _dispatch(self, alert, descriptor):
      """Send alert to VictorOps
  
      Publishing:
          By default this output sends the current publication to VictorOps.
          There is no "magic" field to "override" it: Simply publish what you want to send!
  
      Args:
          alert (Alert): Alert instance which triggered a rule
          descriptor (str): Output descriptor
  
      Returns:
          bool: True if alert was sent successfully, False otherwise
      """
      creds = self._load_creds(descriptor)
      if not creds:
          return False
  
      publication = compose_alert(alert, self, descriptor)
  
      headers = {
          "Content-Type": "application/json",
          "X-VO-Api-Id": creds["victorops_api_id"],
          "X-VO-Api-Key": creds["victorops_api_key"],
      }
  
      data = {
          "message_type": "CRITICAL",
          "entity_id": "streamalert/alert",
          "entity_display_name": alert.rule_name,
          "record": publication["record"],
      }
  
      LOGGER.critical("Sending alert to VictorOps")
      url = creds["url"] + "/" + creds["routing_key"]
      resp = self._post_request(url, data, headers, True)
  
      return self._check_http_response(resp)
  
file_path: streamalert/streamalert/alert_processor/outputs/victorops.py
imports: from collections import OrderedDict
  from streamalert.alert_processor.helpers import compose_alert
  from streamalert.alert_processor.outputs.output_base import OutputDispatcher, OutputProperty, StreamAlertOutput
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 2 for calling the VictorOpsOutput obj's underlying member method code with example usage: obj._dispatch(alert, descriptor) and returns: self, False