Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Azure Integration

Microsoft Azure provides alerts based on monitoring metrics for, or events on, your services. For an alert rule on a metric value, when the value of a specified metric crosses a threshold assigned, the alert rule becomes active and can send a notification. For an alert rule on events, a rule can send a notification on every event, or, only when a certain number of events happen.

​What OpsGenie offer Azure users?

Azure generates alerts based on metrics and events. OpsGenie acts as a dispatcher for the alerts generated by Azure. OpsGenie determining the right people to notify based on on-call schedules and escalations, and notifies them using email, text messages (SMS), phone calls, push notifications. Simply, Azure generates alerts for detected problems, and OpsGenie ensures the right people are working on them.

Functionality of the integration

When an alert is created in Azure, an alert is created in OpsGenie automatically through the integration.

Add Azure integration in OpsGenie

  1. Please create an OpsGenie account if you haven't done already
  2. Go to OpsGenie Azure Integration page,
  3. Specify how the alert should be routed using teams field.
  4. Copy the integration URL by clicking on the copy button or selecting the URL that includes OpsGenie endpoint as well as the API key.
  5. Click on "Save Integration" button.

Configuration in Azure

Note: Azure webhook alerts are only available via the "Azure Preview Portal". If you are using the classic version, please use the Email integration.

  1. Login to Azure portal
  2. Click on browse and select a resource that you want to generate alerts for.
  3. Click on Alert Rules tile in the Operations section and click on Add Alert button
  1. Paste the URL from OpsGenie Azure integration into the Webhook field and save the rule.

Sample payload sent from Azure

Create Alert payload:

{
  "status": "Activated",
  "context": {
    "id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.insights/alertrules/Alert_1_runscope12",
    "name": "Alert_1_runscope12",
    "description": "desc",
    "conditionType": "Metric",
    "condition": {
      "metricName": "Memory available",
      "metricUnit": "Bytes",
      "metricValue": "1032190976",
      "threshold": "2",
      "windowSize": "5",
      "timeAggregation": "Average",
      "operator": "GreaterThan"
    },
    "subscriptionId": "1a66ce04-b633-4a0b-b2bc-a912ec8986a6",
    "resourceGroupName": "montest",
    "timestamp": "2015-09-18T01:02:35.8190994Z",
    "resourceName": "helixtest1",
    "resourceType": "microsoft.compute/virtualmachines",
    "resourceId": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/Microsoft.Compute/virtualMachines/Helixtest1",
    "resourceRegion": "centralus",
    "portalLink": "http://portallink.com"
  },
  "properties": {
    "hello1": "World1!",
    "json_stuff": {
      "type": "critical",
      "color": "red"
    },
    "customId": "wd39ue9832ue9iuhd9iuewhd9edh",
    "send_emails_to": "someone@somewhere.com"
  }
}

This payload is parsed by OpsGenie as:

{
  "status": "Activated",
  "id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/microsoft.insights/alertrules/Alert_1_runscope12",
  "name": "Alert_1_runscope12",
  "description": "desc",
  "condition_type": "Metric",
  "condition_metric_name": "Memory available",
  "condition_metric_unit": "Bytes",
  "condition_metric_value": "1032190976",
  "condition_threshold": "2",
  "condition_window_size": "5",
  "condition_time_aggregation": "Average",
  "condition_operator": "GreaterThan",
  "subscription_id": "1a66ce04-b633-4a0b-b2bc-a912ec8986a6",
  "resource_group_name": "montest",
  "timestamp": "2015-09-18T01:02:35.8190994Z",
  "resource_name": "helixtest1",
  "resource_type": "microsoft.compute/virtualmachines",
  "resource_id": "/subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourceGroups/montest/providers/Microsoft.Compute/virtualMachines/Helixtest1",
  "resource_region": "centralus",
  "portal_link": "http://portallink.com"
}

Sample alert

Azure Integration