VictorOps Notifications
Configuration
Copy REST API URL from VictorOps
Login to your VictorOps account.
Navigate to Alert Behavior > Integrations.
Search for
Metricly
and select the card.Click Enable Integration.
Copy the Service API Endpoint. This is required for the next step.
Create a Webhook Notification in CloudWisdom
In CloudWisdom, navigate to the Policy Editor.
Click tab 3, Notifications.
Click Add Notification and select Webhook as the Notification Type.
Provide a
name
for the webhook notification.Choose your re-notification frequency.
Click New Webhook.
Name
the Webhook.For URL, paste the Service API Endpoint from VictorOps.
Provided a
username
andpassword
if required.Click Test and Save.
Tip
The endpoint URL must return an
HTTP code 200
to pass the validation.Click Save.
Optional Configuration
Headers
Add one or more headers (key-value pairs) to the webhook notification.
Custom Payload
Select Custom from the Payload drop-down menu. A text field will open after selecting Custom. You can use the following variables and/or VictorOps fields to make your notification more dynamic.
Example The below example sends a notification that states the alert’s category name, the name and ID of the element in violation, and the policy name of the violating element. Once the alert has ended, it sends a RECOVERY notification stating the time that the alert ended.
{
"message_type":"<#if payloadType == "event">${eventCategory.name}</#if><#if payloadType == "event_cleared">RECOVERY</#if>",
"entity_id":"${elementId}",
"entity_display_name":"${elementName}",
"state_message":"<#if payloadType == "event"> [${elementName}] [${policyName}] [${eventTimestamp}] : ${policyDescription}</#if><#if payloadType == "event_cleared">The policy ${policyName} has CLEARED for ${elementName} and is no longer generating events as of ${eventTimestamp}</#if>"
}
VictorOps Fields
You can visit the VictorOps knowledge base for more information.
Field Name | Description |
---|---|
message_type | String value. This field allows the following values: INFO, WARNING, ACKNOWLEDGMENT, CRITICAL, RECOVERY. |
entity_id | String value. The name of the alerting entity. |
timestamp | Number value. Timestamp of the alert in seconds since epoch. |
state_start_time | Number value. The time the entity entered its current state (in seconds since epoch). |
state_message | String value. Any additional status information from the alert. |
monitoring_tool | String value. The name of the monitoring system software/application. |
Freemarker Variables
Variable | Description |
---|---|
${elementFqn} | The Fully Qualified Name (FQN) of the element. |
${elementId} | The type of element (e.g., SERVER, ELB, EC2, RDS, etc.). |
${elementLocation} | The location of the element. |
${elementName} | The friendly name for the element. |
${elementType} | The type of element (e.g, SERVER, ELB, RUBY, etc.) |
${event.data.results} | The description of the event as a policy violation. |
${event.id} | The ID of the event |
${eventCategory.name} | The event category ( (Info), (Warning), or (Critical)). |
${eventTimestamp} | The time (in UTC) the event occurred. |
${policyDescription} | The description of the policy that generated the event. |
${policyId} | The policy identification number. |
${policyName} | The name of the policy. |
{
"message_type":"INFO",
"entity_is_host":"Yes",
"entity_id":"${elementId}",
"state_message":"${elementName} is up,
but an event occurred at ${eventTimestamp}."
}