API: Get Warning Thresholds


Browse by products and services

This method provides a way to retrieve the pre-defined thresholds for service warnings.

Request Info

The following URL and HTTP method should be used.

HTTP Method URL
GET https://api.mediatemple.net/api/v1/stats/warnings/thresholds

Response Info

The response will return an HTTP status code to indicate the general category of success or failure to the client. More specific error codes and messages will be contained in the response data itself, if provided. For more information on response codes and parsing response data, see Parsing API Responses.

Sample Request

To get the warnings thresholds for the authenticated account in JSON format, do the following.

 
curl -D log.txt -s -X "GET" "https://api.mediatemple.net/api/v1/stats/warnings/thresholds.json?apikey=a5h34sf62..."
 

Sample Response

Here is an example of the returned result.

 
{
  "thresholds" : {
    "cpu" : [ {
      "min" : 0,
      "percent" : true,
      "max" : 89,
      "desc" : "This is a healthy server",
      "name" : "Healthy",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 90,
      "percent" : true,
      "max" : 119,
      "desc" : "This is an uhealthy server",
      "name" : "Warning",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 120,
      "percent" : true,
      "max" : null,
      "desc" : "This server is in critical condition",
      "name" : "Critical",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    } ],
    "memory" : [ {
      "min" : 0,
      "percent" : true,
      "max" : 89,
      "desc" : "This is a healthy server",
      "name" : "Healthy",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 90,
      "percent" : true,
      "max" : 119,
      "desc" : "This is an uhealthy server",
      "name" : "Warning",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 120,
      "percent" : true,
      "max" : null,
      "desc" : "This server is in critical condition",
      "name" : "Critical",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    } ],
    "diskSpace" : [ {
      "min" : 0,
      "percent" : true,
      "max" : 74,
      "desc" : "This is a healthy server",
      "name" : "Healthy",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 75,
      "percent" : true,
      "max" : 89,
      "desc" : "This is an uhealthy server",
      "name" : "Warning",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 90,
      "percent" : true,
      "max" : 100,
      "desc" : "This server is in critical condition",
      "name" : "Critical",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    } ],
    "processes" : [ {
      "min" : 0,
      "percent" : false,
      "max" : 39,
      "desc" : "This is a healthy server",
      "name" : "Healthy",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 40,
      "percent" : false,
      "max" : 59,
      "desc" : "This is an uhealthy server",
      "name" : "Warning",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 60,
      "percent" : false,
      "max" : null,
      "desc" : "This server is in critical condition",
      "name" : "Critical",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    } ],
    "load1Min" : [ {
      "min" : 0,
      "percent" : false,
      "max" : 14,
      "desc" : "This is a healthy server",
      "name" : "Healthy",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 15,
      "percent" : false,
      "max" : 24,
      "desc" : "This is an uhealthy server",
      "name" : "Warning",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 25,
      "percent" : false,
      "max" : null,
      "desc" : "This server is in critical condition",
      "name" : "Critical",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    } ],
    "load5Min" : [ {
      "min" : 0,
      "percent" : false,
      "max" : 14,
      "desc" : "This is a healthy server",
      "name" : "Healthy",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 15,
      "percent" : false,
      "max" : 24,
      "desc" : "This is an uhealthy server",
      "name" : "Warning",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 25,
      "percent" : false,
      "max" : null,
      "desc" : "This server is in critical condition",
      "name" : "Critical",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    } ],
    "load15Min" : [ {
      "min" : 0,
      "percent" : false,
      "max" : 14,
      "desc" : "This is a healthy server",
      "name" : "Healthy",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 15,
      "percent" : false,
      "max" : 24,
      "desc" : "This is an uhealthy server",
      "name" : "Warning",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 25,
      "percent" : false,
      "max" : null,
      "desc" : "This server is in critical condition",
      "name" : "Critical",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    } ],
    "state" : [ {
      "min" : 0,
      "percent" : false,
      "max" : 0,
      "desc" : "This server is offline",
      "name" : "Offline",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    }, {
      "min" : 1,
      "percent" : false,
      "max" : 1,
      "desc" : "This server is online",
      "name" : "Online",
      "url" : "http://wiki.mediatemple.net/w/Server_Status"
    } ]
  }
}
 

The response above contains multiple possible threshold statuses for each service stat.

Response Fields

The fields in the result represent the following.

Field Description
thresholds A list of service stats

The fields for each Service Stat represent the following.

Field Description
name The name of the current status type
min The start of the range for the current status type
max The end of the range for the current status type
percent Whether or not the value represents a percentage
description A description of the current status
url A URL to more information about the current status