(mt):Get warning thresholds

  • This page was last modified on February 17, 2011, at 14:16.
The (mt) Community Wiki is a collaborative project. Any (mt) Media Temple customer or employee may contribute. Not all articles and/or content have been tested for accuracy by (mt) Media Temple.

For officially moderated and tested articles, be sure to visit our KnowledgeBase.

From (mt) Community Wiki

Contents

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
GEThttps://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
thresholdsA list of service stats

The fields for each Service Stat represent the following:

Field Description
nameThe name of the current status type.
minThe start of the range for the current status type.
maxThe end of the range for the current status type.
percentWhether or not the value represents a percentage.
descriptionA description of the current status.
urlA URL to more information about the current status.