No Data Alert Webhook Formats

DESCRIPTION 

Structure of no data alert object returned by Anodot webhook channels.

Anodot supports Metric 2.0 [recommended] and Metric 1.0 [legacy] formats. See Metric Naming Conventions for details about the difference between the two formats.

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).

NO DATA TEMPLATE
METRIC 2.0 EXAMPLE
METRIC 1.0 EXAMPLE

NO DATA TEMPLATE

 {
"subject": "{{subject}}",
"severity": "{{severity}}",
"description": "{{description}}",
"startTime": "{{startTime}} (UTC)",
"startTimeEpoch": "{{startTimeEpoch}}",
"alerts": [
{{#alerts}}
    {
    "title": "{{title}}",
    "metrics": [
    {{#each metrics}}
        {
        "lastSeen":"{{lastSeen}}",
        "lastSeenEpoch":"{{lastSeenEpoch}}",
        "duration": "{{duration}}",
        "durationInSeconds": "{{durationInSeconds}}",
        "startTime": "{{startTime}} (UTC)",
        "startTimeEpoch": "{{startTimeEpoch}}",
        "name": "{{name}}",
        "state": "{{state}}"
        }{{#unless @last}},{{/unless}}
    {{/each}}
    ],
    "alertId": "{{alertId}}",
    "alertSettingsUrl": "<%=node[:anodotd][:webapp_host_name]%>/#!/alert/{{alertId}}",
    "description": "{{description}}",
    "severity": "{{severity}}"
    }{{#unless @last}},{{/unless}}
{{/alerts}}
]
}

METRIC 2.0 EXAMPLE

 {
"subject": "Alert Open: No Data Reported Sample No Data Alert 1479763791301[critical][576ff]",
"severity": "critical",
"description": "should generate one alert on no data",
"startTime": "11/21/2016 21:32:12 (UTC)",
"startTimeEpoch": "1479763932",
"alerts": [
    {
    "title": "Sample No Data Alert 1479763791301",
    "metrics": [   
        {
        "lastSeen":"11/21/2016 20:50:12",
        "lastSeenEpoch":"1479761412",
        "duration": "2m",
        "durationInSeconds": "120",
        "startTime": "11/21/2016 21:32:12 (UTC)",
        "startTimeEpoch": "1479763932",
        "name": ""what=total_sales.country=us.device=mobile.source=db.state=ca.1479763791301",
        "state": "OPEN"
        } 
    ],
    "alertId": "576ff33f-3a7a-4396-888f-16edc20b98ad",
    "alertSettingsUrl": "https://app.staging.anodot.com/#!/alert/576ff33f-3a7a-4396-888f-16edc20b98ad",    "description": "should generate one alert on no data",
    "severity": "critical"
    }
]
}

 METRIC 1.0 EXAMPLE

 {
"subject": "Alert Open: No Data Reported Sample No Data Alert 1448141391301[critical][576ff]",
"severity": "critical",
"description": "should generate one alert on no data",
"startTime": "11/21/2016 21:32:12 (UTC)",
"startTimeEpoch": "1479763932",
"alerts": [
    {
    "title": "Sample No Data Alert 1479763791301",
    "metrics": [   
        {
        "lastSeen":"11/21/2016 20:50:12",
        "lastSeenEpoch":"1479761412",
        "duration": "2m",
        "durationInSeconds": "120",
        "startTime": "11/21/2016 21:32:12 (UTC)",
        "startTimeEpoch": "1479763932",
        "name": "total_sales.us.mobile.db.ca.1479763791301",
        "state": "OPEN"
        } 
    ],
    "alertId": "576ff33f-3a7a-4396-888f-16edc20b98ad",
    "alertSettingsUrl": "https://app.staging.anodot.com/#!/alert/576ff33f-3a7a-4396-888f-16edc20b98ad",    "description": "should generate one alert on no data",
    "severity": "critical"
    }
]
}

 

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