salt.modules.victorops

Support for VictorOps

New in version 2015.8.0.

Requires an api_key in /etc/salt/minion:

salt.modules.victorops.create_event(message_type=None, routing_key='everybody', **kwargs)

Create an event in VictorOps. Designed for use in states.

The following parameters are required:

Parameters

message_type -- One of the following values: INFO, WARNING, ACKNOWLEDGEMENT, CRITICAL, RECOVERY.

The following parameters are optional:

Parameters
  • routing_key -- The key for where messages should be routed. By default, sent to 'everyone' route.

  • entity_id -- The name of alerting entity. If not provided, a random name will be assigned.

  • timestamp -- Timestamp of the alert in seconds since epoch. Defaults to the time the alert is received at VictorOps.

:param timestamp_fmt The date format for the timestamp parameter.

Parameters
  • state_start_time -- The time this entity entered its current state (seconds since epoch). Defaults to the time alert is received.

  • state_start_time_fmt -- The date format for the timestamp parameter.

  • state_message -- Any additional status information from the alert item.

  • entity_is_host -- Used within VictorOps to select the appropriate display format for the incident.

  • entity_display_name -- Used within VictorOps to display a human-readable name for the entity.

  • ack_message -- A user entered comment for the acknowledgment.

  • ack_author -- The user that acknowledged the incident.

Returns

A dictionary with result, entity_id, and message if result was failure.

CLI Example:

salt myminion victorops.create_event message_type='CRITICAL' routing_key='everyone'                  entity_id='hostname/diskspace'

salt myminion victorops.create_event message_type='ACKNOWLEDGEMENT' routing_key='everyone'                  entity_id='hostname/diskspace' ack_message='Acknowledged' ack_author='username'

salt myminion victorops.create_event message_type='RECOVERY' routing_key='everyone'                  entity_id='hostname/diskspace'
The following parameters are required:

message_type