ThousandEyes Integration

ThousandEyes is a tool that monitors internal and external network performance to improve application delivery and reduce service interruptions. OpsGenie is an alert and notification management solution that is highly complementary to ThousandEyes.

What does OpsGenie offers to ThousandEyes users?

The ThousandEyes platform allows customers to configure highly customizable Alert Rules and assign them to tests, in order to highlight or be notified of events of interest. With ThousandEyes Integration, OpsGenie acts as a dispatcher for these alerts, determining the right people to notify based on on-call schedules, notifying them using email, text messages (SMS), phone calls and iPhone & Android push notifications, and escalating alerts until the alert is acknowledged or closed.


Functionality of the integration

  • An alert notification is triggered when tests results assigned to the alert meets the conditions, an alert is also created in OpsGenie automatically through the integration.
  • When the alert is cleared in ThousandEyes, the alert is also closed in OpsGenie.

Add ThousandEyes Integration in OpsGenie

  1. Please create an OpsGenie account if you haven't done already
  2. Go to OpsGenie ThousandEyes Integration page,
  3. Specify who should be notified for ThousandEyes alerts using the "Teams" and "Recipients" fields. Auto-complete suggestions will be provided as you type. 
  4. Copy the Api URL by clicking on the copy button or selecting.
  5. Click on "Save Integration".

Configuration in ThousandEyes

  1. In ThousandEyes, open Alerts Screen from the side menu
  2. Create or Edit an existing alert
  3. Open Notifications Tab of the alert
  4. Click Edit Webhooks in Webhooks section
  5. Click Add New Webhook
  6. Paste API URL into URL field.
  7. Click Save Webhook
  8. Return to alert configuration page, choose the webhook you added recently from Select Webhooks dropdown.
  9. Click Create

Sample payload sent from ThousandEyes

Create Alert payload:

{
    "eventType":"ALERT_NOTIFICATION_TRIGGER",
    "eventId":"8416215-4867000",
    "alert":{
        "agents":[
            {
                "active":1,
                "metricsAtStart":"Error Type: \"Connect\"",
                "metricsAtEnd":"",
                "agentId":4522,
                "agentName":"Amsterdam, Netherlands (Trial)",
                "dateStart":"2016-06-07 08:48:08",
                "permalink":"https://app.thousandeyes.com/web/http-server?__a=50664&testId=106681&roundId=1465289288&agentId=4522"
            },
            {
                "dateStart": "2014-03-24 19:01:48",
                "active": 1,
                "metricsAtStart": "Error type: \"DNS\"",
                "metricsAtEnd": "Error type: \"DNS\"",
                "agentId": 108,
                "agentName": "Boston, MA",
                "permalink": "https://app.thousandeyes.com/web/http-server?__a=11&testId=5176&roundId=1395699129&agentId=108"
            }

        ],
        "alertId":4867000,
        "dateStart":"2016-06-07 08:48:08",
        "apiLinks":[
        {
            "rel":"related",
            "href":"https://api.thousandeyes.com/tests/106681"
        },
        {
            "rel":"data",
            "href":"https://api.thousandeyes.com/web/http-server/106681"
        }
        ],
        "permalink":"https://app.thousandeyes.com/web/http-server?__a=50664&testId=106681&roundId=1465289288",
        "ruleExpression":"Error Type is any",
        "ruleName":"Default HTTP Alert Rule",
        "ruleId": 414881,
        "testId":106681,
        "testName":"test1",
        "violationCount":1,
        "type":"HTTP Server"
    }
}

This payload is parsed by OpsGenie as:

[
    "eventId" : "8416215-4867000",
    "eventType" : "ALERT_NOTIFICATION_TRIGGER",
    "ruleExpression" : "Error Type is any",
    "type" : "HTTP Server",
    "agents" : "Agents:

    Id:4522
    Name:Amsterdam, Netherlands (Trial)
    Active:1
    MetricsAtStart:Error Type: "Connect"
    MetricsAtEnd:

    Id:108
    Name:Boston, MA
    Active:1
    MetricsAtStart:Error type: "DNS"
    MetricsAtEnd:Error type: "DNS"

    ",
    "violationCount" : "1",
    "dateStart" : "2016-06-07 08:48:08",
    "ruleName" : "Default HTTP Alert Rule",
    "testId" : "106681",
    "alertId" : "4867000",
    "permalink" : "https://app.thousandeyes.com/web/http-server?__a=50664&testId=106681&roundId=1465289288",
    "ruleId" : "414881",
    "testName" : "test1"
]

Close Alert payload:

{
    "eventType": "ALERT_NOTIFICATION_CLEAR",
    "eventId": "8416248-4867000",
    "alert": {
        "agents": [
            {
            "active": 0,
            "metricsAtStart": "Error Type: \"Connect\"",
            "metricsAtEnd": "Error Type: \"None\"",
            "agentId": 4522,
            "agentName": "Amsterdam, Netherlands (Trial)",
            "dateStart": "2016-06-07 08:48:08",
            "permalink": "https://app.thousandeyes.com/web/http-server?__a=50664&testId=106681&roundId=1465289288&agentId=4522"
            }
        ],
        "alertId": 4867000,
        "dateEnd": "2016-06-07 08:50:05",
        "dateStart": "2016-06-07 08:48:08",
        "apiLinks": [
            {
                "rel": "related",
                "href": "https://api.thousandeyes.com/tests/106681"
            },
            {
                "rel": "data",
                "href": "https://api.thousandeyes.com/web/http-server/106681"
            }
        ],
        "permalink": "https://app.thousandeyes.com/web/http-server?__a=50664&testId=106681&roundId=1465289288",
        "ruleExpression": "Error Type is any",
        "ruleName": "Default HTTP Alert Rule",
        "ruleId" : "414881",
        "testId": 106681,
        "testName": "test1",
        "violationCount": 1,
        "type": "HTTP Server"
    }
}

Sample alert