Webhook payload samples

Please find herein payload samples for Webhook. Please note that:

  • Payloads for Alerts 1.0 and Alerts 2.0 are different by their structure and params. The difference stems from different concepts behind the two alerting models: e.g. in Alerts 2.0 we send the monitor’s threshold-based status, violated thresholds and failed metrics (see Alerts 2.0) as alert params, and in Alerts 1.0 there is no threshold-based status, and the failed metric and violated threshold data are sent all in one param (adddata). See the samples to understand the exact formatting of the payloads.
    Note: Monitis is currently in the process of ongoing transition to its new alerting model Alerts 2.0. You can find the updated list of migrated monitors under Migration to Alerts 2.0.
  • Payloads for Alerts 2.0 do not specify the monitor type, as payload formats are the same for all types of monitors that Alerts 2.0 is currently available for.
  • Due to known limitation in the GET request size, the Query String format payload contains less data as compared to JSON and XML templates: e.g. it doesn’t contain the failed metrics and violated thresholds data. Use JSON or XML formats for full alert data.
  • JSON and XML format payloads contain the same data: use one or another at your convenience.
  • The Offline Agent payloads are for two types of alerts: offline and recovery, and they contain no status, as there is no status in Offline Agent alerts.


Payload Samples


Alerts 1.0


UPTIME

*QUERY STRING

Status: PROBLEM

alertType=PROBLEM&group=Default&failedLocations=US-MID, US-EST&adddata= HTTP CRITICAL: HTTP/1.1 200 OK – string ‘test’ not found on ‘www.example.com’ – 15120 bytes in 1.142 second response time&type=HTTP&url=www.example.com&alertId=176256934&time=11-24-2015 09:58:54 (GMT + 4)&name=example.com

Status: RECOVERY

alertType=RECOVERY&group=Default&adddata= HTTP OK: HTTP/1.1 200 OK – 14934 bytes in 1.128 second response time &type=HTTP&url=www.example.com&alertId=176254784&time=11-24-2015 09:58:34 (GMT + 4)&downtime=13 minute(s) 36 second(s)&name=example.com


*JSON

Status: PROBLEM

{“alert”:{
“alertId”:176256934,
“time”:”11-24-2015 09:00:50 (GMT + 4)”,
“name”:”example.com”,
“alertType”:”PROBLEM”,
“failedLocations”:”US-EST, US-NY”,
“adddata”:”HTTP CRITICAL: HTTP/1.1 200 OK – string ‘test’ not found on     ‘http:example.com’ – 12888 bytes in 0.441 second response time”,
“group”:”Default”,
“type”:”HTTP”,
“url”:”www.example.com”
}
}

Status: RECOVERY

{“alert”:{
“alertId”:176256934,
“time”:”11-24-2015 10:00:50 (GMT + 4)”,
“downtime”:”1 minute(s) 56 second(s)”,
“name”:”example.com”,
“alertType”:”RECOVERY”,
“adddata”:”HTTP OK: HTTP/1.1 200 OK – 148 bytes”,
“group”:”Default”,
“type”:”HTTP”,
“url”:”www.example.com”
}
}


*XML

Status: PROBLEM

<alert>
<alertType>PROBLEM</alertType>
<type>HTTP</type>
<name>example.com</name>
<url>www.example.com</url>
<time>11-24-2015 09:58:54 (GMT + 4)</time>
<group>Default</group>
<failedLocations>US-MID, US-EST</failedLocations>
<alertId>176256934</alertId>
<adddata>HTTP CRITICAL: HTTP/1.1 200 OK – string ‘test’ not found on http://www.example.com’ – 15120 bytes in 1.142 second response time</adddata>
</alert>

Status: RECOVERY

<alert>
<alertType>RECOVERY</alertType>
<type>HTTP</type>
<name>example.com</name>
<url>www.example.com</url>
<time>11-24-2015 10:00:50 (GMT + 4)</time>
<group>Default</group>
<downtime> 1 minute(s) 56 second(s)</downtime>
<alertId>176256934</alertId>
<adddata> HTTP OK: HTTP/1.1 200 OK – 14850 bytes in 1.411 second response time </adddata>
</alert>


TRANSACTION

*QUERY STRING

Status: PROBLEM

alertType=PROBLEM&group=exampleGroup&failedLocations=AU, ZA&type=Transaction&errorString=Not Found: “example.com” Not Found&url=www.example.com&alertId=175880604&time=11-23-2015 15:22:00 (GMT + 4)&stepDuration=30.456&name=zendesk_0.3264550529420376&capture=http://www.example.com/test91157_result908692434.png&stepDesc=waitForElementPresent&step=2

Status: RECOVERY

alertType=RECOVERY&group=exampleGroup&type=Transaction&url=example.com&alertId=175883768&time=11-23-2015 15:21:45 (GMT + 4)&downtime=2 minute(s) 45 second(s)&name=example.com


*JSON

Status: PROBLEM

{“alert”:{
“alertType”:”PROBLEM”,
“type”:”Transaction”,
“errorString”:”Not Found: \”https://example.com/home\”Not Found”,
“url”:”example.com”,
“time”:”11-23-2015 15:27:00 (GMT + 4)”,
“stepDuration”:30.492,
“alertId”:175880604,
“name”:”example.com”,
“capture”:”http://www.example.com/test91157_result908696074.png”,
“failedLocations”:”AU, ZA”,
“group”:”exampleGroup”,
“stepDesc”:”waitForElementPresent”,
“step”:”2”
}
}

Status: RECOVERY

{“alert”:{
“alertType”:”RECOVERY”,
“name”:”example.com”,
“time”:”11-20-2015 12:03:07 (GMT + 4)”,
“alertId”:174785576,
“type”:”Transaction”,
“url”:”example.com”,
“group”:”exampleGroup”
}
}


*XML

Status: PROBLEM

<alert>
<alertType>PROBLEM</alertType>
<type>Transaction</type>
<name>example.com</name>
<url>www.example.com</url>
<time>11-23-2015 15:27:00 (GMT + 4)</time>
<group> exampleGroup </group>
<failedLocations>AU, ZA</failedLocations>
<step>2</step>
<stepDesc>waitForElementPresent</stepDesc>
<stepDuration>30.492</stepDuration>
<capture>www.example.com/test91157_result908696074.png</capture>
<alertId>175880604</alertId>
<errorString>Found: \”www.example.com/home\”Not Found</errorString>
</alert>

Status: RECOVERY

<alert>
<alertType>RECOVERY</alertType>
<type>Transaction</type>
<name>example.com</name>
<url>example.com</url>
<time>11-23-2015 15:21:45 (GMT + 4)</time>
<group>exampleGroup</group>
<downtime>2 minute(s) 45 second(s)</downtime>
<alertId>175883768</alertId>
</alert>

 

FULL PAGE LOAD

*QUERY STRING

Status: PROBLEM

alertType=PROBLEM&group=exampleGroup&failedLocations=MX, IL&type=FullPage&errorString=Timed out after 1000ms&url=www.example.com&alertId=175883768&time=11-23-2015 15:20:37 (GMT + 4)&name=example.com

Status: RECOVERY

alertType=RECOVERY&group=exampleGroup&type=FullPage&url=www.example.com&alertId=175883768&time=11-23-2015 15:21:45 (GMT + 4)&downtime=2 minute(s) 45 second(s)&name=example.com


*JSON

Status: PROBLEM

{“alert”:{
“alertType”:”PROBLEM”,
“type”:”FullPage”,
“name”:”example.com”,
“group”:”exampleGroup”,
“failedLocations”:”US MID, AT”,
“time”:”11-20-2015 12:03:07 (GMT + 4)”,
“alertId”:174785576,
“url”:”www.example.com”,
“errorString”:”Timed out after 1000ms”
}
}

Status: RECOVERY

{“alert”:{
“alertType”:”RECOVERY”,
“name”:”example.com”,
“time”:”11-20-2015 12:03:07 (GMT + 4)”,
“alertId”:174785576,
“type”:”FullPage”,
“url”:”www.example.com”,
“group”:”exampleGroup”
}
}


*XML

Status: PROBLEM

<alert>
<alertType>PROBLEM</alertType>
<type>FullPage</type>
<name>example.com</name>
<url>www.example.com</url>
<time>11-23-2015 15:20:37 (GMT + 4)</time>
<group>Default</group>
<failedLocations>MX, IL</failedLocations>
<alertId>175883768</alertId>
<errorString>Timed out after 1000ms</errorString>
</alert>

Status: RECOVERY

<alert>
<alertType>RECOVERY</alertType>
<type>FullPage</type>
<name>example.com</name>
<url>www.example.com</url>
<time>11-23-2015 15:21:45 (GMT + 4)</time>
<group>exampleGroup</group>
<downtime>2 minute(s) 45 second(s)</downtime>
<alertId>175883768</alertId>
</alert>

 

SERVER/DEVICE

*QUERY STRING

Status: PROBLEM

alertType=PROBLEM&group=exampleGroup&adddata=Current CPU usage: 0.00% / Max value: 0 Current Working set size: 2.61 MB / Max value: 2 Current Page file usage: 3.69 MB / Max value: 2&type=Process&name=processes_snmp.exe@mad.178&alertId=175898832&time=11-24-2015 09:56:41 (GMT + 4)&agent=exampleAgent

Status: RECOVERY

alertType=RECOVERY&group=exampleGroup&adddata=Drive: C free space is within acceptable limits.&type=Drive&name=drive_C@live.178&alertId=178819668&time=12-15-2015 09:12:39 (GMT + 4)&agent=exampleAgent&downtime=2 minute(s) 45 second(s)


*JSON

Status: PROBLEM

{“alert”:{
“alertId”:”175898832″,
“time”:”11-24-2015 11:06:48 (GMT + 4)”,
“name”:”processes_snmp.exe@exampleAgent”,
“alertType”:”PROBLEM”,
“adddata”:”Current CPU usage: 0.02% / Max value: 0 Current Working set size: 2.61 MB / Max value: 2 Current Page file usage: 3.69 MB / Max value: 2″,
“group”:”exampleGroup”,
“type”:”Process”,
“agent”:”exampleAgent”
}
}

Status: RECOVERY

{“alert”:{
“alertId”:”168597670″,
“time”:”12-14-2015 10:02:15 GMT”,
“downtime”:”41 day(s) 23 hour(s) 1 minute(s) 36 second(s)”,
“name”:”drive_C@exampleAgent”,
“alertType”:”RECOVERY”,
“adddata”:”Drive: C free space is within acceptable limits.”,
“group”:”exampleGroup”,
“type”:”Drive”,
“agent”:”exampleAgent”
}
}


* XML

Status: PROBLEM

<alert>
<alertType>PROBLEM</alertType>
<agent>exampleAgent</agent>
<type>Process</type>
<name>processes_snmp.exe@exampleAgent</name>
<time>11-24-2015 11:06:48 (GMT + 4)</time>
<group>exampleGroup</group>
<alertId>175898832</alertId>
<adddata>Current CPU usage: 0.02% / Max value: 0 Current Working set size: 2.61 MB / Max value: 2 Current Page file usage: 3.69 MB / Max value: 2</adddata>
</alert>

Status: RECOVERY

<alert>
<alertType>RECOVERY</alertType>
<agent>live.178</agent>
<type>Drive</type>
<name>Drive@exampleAgent</name>
<time>11-24-2015 11:06:45 (GMT + 4)</time>
<group>exampleGroup</group>
<alertId>176018238</alertId>
<adddata>Drive: C free space is within acceptable limits.</adddata>
<downtime>2 minute(s) 45 second(s)</downtime>
</alert>

 

Alerts 2.0

*QUERY STRING

Status: PROBLEM

status=Warning&type=Bandwidth&name=exampleName&alertId=1448340624974&alertType=PROBLEM&agent=exampleAgent&group=exampleGroup&time=11-24-2015 09:55:24 (GMT + 4)

Status: RECOVERY

alertType=RECOVERY&group=exampleGroup&adddata=Drive: C free space is within acceptable limits.&type=Bandwidth&name=exampleName&alertId=178819668&time=12-15-2015 09:12:39 (GMT + 4)&agent=exampleAgent&downtime=2 minute(s) 45 second(s)


*JSON

Status: PROBLEM

{“alert”:{
“status”:”WARNING”,
“name”:”exampleName”,
“agent”:”exampleAgent”,
“alertType”:”PROBLEM”,
“time”:”10:45:24 11-24-2015 (GMT + 4)”,
“alertId”:1448340624974”,
“violatedThresholds”:”if for 1 consecutive check(s) Input Traffic (B/sec) <4000 OR check failed”,
“failedMetrics”:”{\”BytesReceivedPersec\”:\”1608.09\”}”,
“type”:”Bandwidth”,
“status”:”WARNING”,
“group”:”exampleGroup”
}
}

Status: RECOVERY

{“alert”:{
“downtime”:”15 min(s)”,
“agent”:”exampleAgent”,
“alertType”:”RECOVERY”,
“name”:”exampleName”,
“time”:”10:21:01 12-14-2015″,
“alertId”:1450087607429,
“type”:”Bandwidth”,
“startDate”:”10:06:01 12-14-2015″,
“endDate”:”10:21:01 12-14-2015″,
“status”:”Ok”
“group”:”exampleGroup”
}
}


*XML

Status: PROBLEM

<alert>
<alertType>PROBLEM</alertType>
<status>WARNING</status>
<name>exampleName</name>
<agent>exampleAgent</agent>
<type>Bandwidth</type>
<time>11:05:24 11-24-2015 (GMT + 4)</time>
<group>exampleGroup</group>
<alertId>1448340624974</alertId>
<violatedThresholds>
<![CDATA[if for 1 consecutive check(s) Input Traffic (B/sec) <4000 OR check failed]]>
</violatedThresholds>
<failedMetrics>
<BytesReceivedPersec>1410.27</BytesReceivedPersec>
</failedMetrics>
</alert>

Status: RECOVERY

<alert>
<alertType>RECOVERY</alertType>
<status>Ok</status>
<name>exampleName</name>
<agent>exampleAgent</agent>
<type>Bandwidth</type>
<time>11:23:44 12-09-2015 (GMT + 4)</time>
<group>exampleGroup</group>
<startDate>11:03:44 12-09-2015 (GMT + 4)</startDate>
<endDate>11:23:44 12-09-2015 (GMT + 4)</endDate>
<downtime>20 min(s) </downtime>
<alertId>1449644626145</alertId>
</alert>

 

Offline Alerts

*QUERY STRING

Status: PROBLEM

name=example.com&time=23-11-2015 18:56:00 (GMT + 4)&type=Agent&alertType=OFFLINE

Status: RECOVERY

downtime=12 minute(s)&name=exampleName&time=14-12-2015 14:53:00 (GMT + 4)&type=Agent&alertType=RECOVERY


*JSON

Status: PROBLEM

{“alert”:{
“alertType”:”OFFLINE”,
“name”:”exampleName”,
“time”:”10-11-2015 15:08:00 (GMT + 4)”,
“type”:”Agent”
}
}

Status: RECOVERY

{“alert”:{
“alertType”:”RECOVERY”,
“name”:”exampleName”,
“time”:”10-12-2015 13:19:00 (GMT + 4)”,
“type”:”Agent”,
“downtime”:”2 hour(s) 28 minute(s)”
}
}


*XML

Status: PROBLEM

<alert>
<alertType>OFFLINE</alertType>
<type>Agent</type>
<name>exampleName</name>
<time>23-11-2015 18:56:00 (GMT + 4)</time>
</alert>

Status: RECOVERY

<alert>
<alertType>RECOVERY</alertType>
<type>Agent</type>
<name>exampleName</name>
<time>14-12-2015 14:53:00 (GMT + 4)</time>
<downtime>12 minute(s)</downtime>
</alert>