Anomaly Alert Webhook Formats

 DESCRIPTION 

Structure of an anomaly alert object returned by Anodot webhook channels.

Anodot supports Metric 2.0 [recommended] and Metric 1.0 [legacy] formats. 
See REST API Integration Overview

Notes:

  • Epoch time is always in seconds (UTC time).
  • The alert templates show the structure (with iterators if a number of metrics and alerts descriptions are combined to the same alert message).

ANOMALY ALERT TEMPLATE 
METRIC 2.0 EXAMPLE
METRIC 1.0 EXAMPLE

ANOMALY ALERT TEMPLATE

{
"subject": "{{subject}}",
"severity": "{{severity}}",
"description": "{{description}}",
"investigationUrl":” {{The link to the Anoboard}}",
"startTime": "{{startTime}} (UTC)",
"startTimeEpoch": "{{startTimeEpoch}}",
"anomalyId": "{{anomalyId}}",
"mergedAnomalies":"[{{anomalyId}}]",
"alerts": [
{{#alerts}}
    {
    "title": "{{title}}",
    "metrics": [
    {{#each metrics}}
        {
        "duration": "{{duration}}",
        "durationInSeconds": "{{durationInSeconds}}",
        "startTime": "{{startTime}} (UTC)",
        "startTimeEpoch": "{{startTimeEpoch}}",
        "imageUrl": "{{imageUrl}}",
        "peak": "{{peak}}",
        "direction": "{{direction}}",
        "delta": {{delta}},
         "significance" : {{score}},
        "name": "{{name}}",
        "id":"{{id}}",
        "state": "{{state}}",
        "season":"{{season}}"
        }
    {{/each}}
    ],
"events":{
"Total":"{{total Events}}",
"buckets":[
{{#if events}}
   {{#each events}}
       {
       "date":"{{date}}",
       "Total":"{{total events in aggregation}}",
       "topEvents":[
       {{#each topEvents}}
           {
           "title" :"{{title}}",
           "description" :"{{description}}",
           "source" :"{{source}}",
           "category" : "{{category}}",
           "startDate" :"{{startDate}}",
           "endDate" : "{{endDate}}"
           }
         {{/each}}
       ]
       }
   {{/each}}
{{/if}}
]
},
    "alertId": "{{alertId}}",
    "alertSettingsUrl": "{{The link to the alert’s setting}}",
    "description": "{{description}}",
    "severity": "{{severity}}"
    }{{/alerts}}
]
}

 
WEBHOOK MAIN FIELDS

Field  Description and content
subject Alert subject - same as alert email. Taken from Alert
title
severity Determined by the alert with the highest severity
amongst the alerts included in the webhook
description Description of the alert who’s title was used in the
subject
investigationUrl Link to Anoboard within Anodot for investigation
purposes
startTime Human readable start time of 1st alert in the anomaly
startTimeEpoch startTime in Epoch
mergedAnomalies An array of all merged anomalies
alerts An array of all alerts included in this triggered instance
metrics An array of all metrics in each alert
direction Up/down or both. If both, then the upper/lower are
relevant
delta  For backward compatibility
name Metric name (including tags and user given names
for composite)
id Metric id
state Either open closed
season If relevant
events If correlated in the alert - User events within the time of the alert metrics
buckets An array of the events grouped by dates
topEvents Top X events for the alert
alertid Specific alert id
AlertSettingsURl Link to specific alert configuration
description Specific alert description
severity Specific alert severity

METRIC 2.0 EXAMPLE (WITH MULTIPLE METRICS)

{
;"subject": "Alert Close: 3. Automation MAL1 1529574652785[info][e21d2]",
"severity": "info",
"description": "should generate two open alert stories with AL1 contains metrics m1 and m3 all up with severity info and one close with m1,m2,m3",
"investigationUrl": "https://kstaging.anodot.com/#!/anomalies?tabs=main;0&activeTab=1&anomalies=;0(e21d2ac344614b1c94a2b17f1c060cde)&duration=;1(1)&durationScale=;minutes(minutes)&delta=;1(1)&deltaType=;percentage(percentage)&resolution=;short(short)&score=;0(0)&state=;both(both)&direction=;both(both)&bookmark=;()&alertId=;(c8bc0143-7b9f-4fa7-a036-5748c846b2ab)&sort=;significance(significance)&q=;()&constRange=;1h(c)&startDate=;0(0)&endDate=;0(0)",
"startTime": "06/20/2018 11:30 (UTC)",
"startTimeEpoch": "1529494200",
"anomalyId": "e21d2ac344614b1c94a2b17f1c060cde",
"mergedAnomalies": "[e21d2ac344614b1c94a2b17f1c060cde, 8062a65b854c49868d3939e2ca2c60dd]",
"alerts": [

{
"title": "3. Automation MAL1 1529574652785",
"metrics": [

{
"duration": "12m",
"durationInSeconds": "720",
"startTime": "06/20/2018 11:39 (UTC)",
"startTimeEpoch": "1529494740",
"imageUrl": "https://alert-images-staging.s3.amazonaws.com/i:c8bc0143-7b9f-4fa7-a036-5748c846b2abe:da48ea9892d5e2a5c1966e1f4ea94adds:close.png",
"peak": "500.0",

"upperPeak": "500.0",


"direction": "UP",
"delta": 1000,

"upperPercentageDelta": 1000,


"significance" : 0,
"name": "automation.alert.m2.1529574652785",
"id": "automation.alert.m2.1529574652785",
"state": "CLOSED",
"season": "NA"
},

{
"duration": "13m",
"durationInSeconds": "780",
"startTime": "06/20/2018 11:32 (UTC)",
"startTimeEpoch": "1529494320",
"imageUrl": "https://alert-images-staging.s3.amazonaws.com/i:c8bc0143-7b9f-4fa7-a036-5748c846b2abe:5c984b2fa43b800b1bdddf2685dcd28bs:close.png",
"peak": "500.0",

"upperPeak": "500.0",


"direction": "UP",
"delta": 1000,

"upperPercentageDelta": 1000,


"significance" : 0,
"name": "automation.alert.m3.1529574652785",
"id": "automation.alert.m3.1529574652785",
"state": "CLOSED",
"season": "NA"
},

{
"duration": "10m",
"durationInSeconds": "600",
"startTime": "06/20/2018 11:30 (UTC)",
"startTimeEpoch": "1529494200",
"imageUrl": "https://alert-images-staging.s3.amazonaws.com/i:c8bc0143-7b9f-4fa7-a036-5748c846b2abe:76aa6bbbb35a041ffe8a7fd6a2a77b97s:close.png",
"peak": "500.0",

"upperPeak": "500.0",


"direction": "UP",
"delta": 1000,

"upperPercentageDelta": 1000,


"significance" : 0,
"name": "automation.alert.m1.1529574652785",
"id": "automation.alert.m1.1529574652785",
"state": "CLOSED",
"season": "NA"
}

],
"events":{
"total":"0",
"buckets":[

]
},
"alertId": "363d6228-43e8-4fbe-89fa-2779335c7145",
"alertSettingsUrl": "https://kstaging.anodot.com/#!/alerts/363d6228-43e8-4fbe-89fa-2779335c7145",
"description": "should generate two open alert stories with AL1 contains metrics m1 and m3 all up with severity info and one close with m1,m2,m3",
"severity": "info"
}

]
}

METRIC 1.0  EXAMPLE (WITH MULTIPLE METRICS)

{
 {
  "subject": "Alert Open: Sample Anomaly Alert 1448200156553[critical][44d4c]",
  "severity": "critical",
  "description": "Sample anomaly Alert with multiple metrics",
  "investigationUrl": "https://app.staging.anodot.com/#!/anomalies/board?anomalies=main;44d4ce047bb5d300d7a94cec63e30cad&activeTab=1&duration=
1;1&durationScale=minutes;minutes&delta=1;1&deltaType=percentage;
percentage&resolution=short;short&alertId=;cfcb5a94-ba91-4128-8002-990b15c85eed&score=0;0&state=both;both&direction=both;both&sort=startDate;
startDate&constRange=1h;1h&q='
'",
  "startTime": "11/21/2016 15:17:00 (UTC)",
  "startTimeEpoch": "1479741360",
  "alerts": [
    {
      "title": "Metric sample 1 1479822556553",
      "metrics": [
        {
          "duration": "1m",
          "durationInSeconds": "60",
          "startTime": "11/21/2016 15:17:00 (UTC)",
          "startTimeEpoch": "1479741360",
          "imageUrl": "https://alert-images-staging.s3.amazonaws.com/i:cfcb5a94-ba91-4128-8002-990b15c85eede:40eeba9f5b9098a2135ed7568cec71b4.png",
          "peak": "500.0000",
          "direction": "UP",
          "delta": 1000,
          "significance": 84,
          "name": "total_sales.us.mobile.db.ca.1479822556553",
          "state": "OPEN"
        }
      ],
      "events": {
        "total": "2",
        "buckets": [
          {
            "date": "1472626800",
            "total": "1",
            "topEvents": [
              {
                "title": "Sample 1 Title",
                "description": "Sample 1 Description",
                "source": "jenkins",
                "category": "deployments",
                "startDate": "1472626597",
                "endDate": "1472626597"
              }
            ]
          },
          {
            "date": "1472626200",
            "total": "1",
            "topEvents": [
              {
                "title": "Sample 2 Title",
                "description": "Sample 2 Description",
                "source": "jenkins",
                "category": "deployments",
                "startDate": "1472625982",
                "endDate": "1472625982"
              } 
          ]
          }
        ]
      },
      "alertId": "14a87e94-567e-4bd5-93d9-1e0112b92702",
      "alertSettingsUrl": "https://app.staging.anodot.com/#!/alert/14a87e94-567e-4bd5-93d9-1e0112b92702",
      "description": "Sample anomaly Alert with multiple metrics",
      "severity": "critical"
    },
    {
      "title": "Metric Sample 2 1479822540553",
      "metrics": [
        {
          "duration": "12m",
          "durationInSeconds": "720",
          "startTime": "11/21/2016 15:17:00 (UTC)",
          "startTimeEpoch": "1479822540",
          "imageUrl": "https://alert-images-staging.s3.amazonaws.com/i:cfcb5a94-ba91-4128-8002-990b15c85eede:066a6923371fc91cc9db2a5a82367324.png",
          "peak": "-500.0000",
          "direction": "DOWN",
          "delta": 1000,
          "significance": 81,
          "name": "total_sales.us.mobile.db.ny.1479822540553",
          "state": "OPEN"
        }
      ],
      "events": {
        "total": "2",
        "buckets": [
          {
            "date": "1472626800",
            "total": "1",
            "topEvents": [
              {
                "title": "Service D deployment Failed on saasweb1",
                "description": "deployment ID 426981",
                "source": "jenkins",
                "category": "deployments",
                "startDate": "1472626597",
                "endDate": "1472626597"
              }
            ]
          },
          {
            "date": "1472626200",
            "total": "1",
            "topEvents": [
              {
                "title": "Service C deployment Success on off1",
                "description": "deployment ID 389870",
                "source": "jenkins",
                "category": "deployments",
                "startDate": "1472625982",
                "endDate": "1472625982"
              }
            ]
          }
        ]
      },
      "alertId": "c417f6f5-8f5b-4ea6-970c-f2499619f1a8",
      "alertSettingsUrl": "https://app.staging.anodot.com/#!/alert/c417f6f5-8f5b-4ea6-970c-f2499619f1a8",
      "description": "should generate one alert story with DAL1 contains metrics m1(up) and DAL2 contains metrics m4(down)",
      "severity": "critical"
    }
  ]
}  

 
Was this article helpful?
0 out of 0 found this helpful
-->