Cloud Management API 1.5

MonitoringMetrics

A monitoring metric is a stream of data that is captured in an instance. Metrics can be monitored, graphed and can be used as the basis for triggering alerts.

Actions

index

Lists the monitoring metrics available for the instance and their corresponding graph hrefs. Making a request to the graph_href will return a png image corresponding to that monitoring metric.

URLs
GET /api/clouds/:cloud_id/instances/:instance_id/monitoring_metrics
HTTP response code
200 OK
Content-type
application/vnd.rightscale.monitoring_metric;type=collection

Required roles

Required settings

Parameters

name required type values regexp blank? description
filter no Array * * no See below for valid filter parameters.
period no String now, day, yday, week, lweek, month, quarter, year * no The time scale for which the graph is generated. Default is 'day'
size no String thumb, tiny, small, large, xlarge * no The size of the graph to be generated. Default is 'small'.
title no String * * no The title of the graph.
tz no String * * no The time zone in which the graph will be displayed. Default will be 'America/Los_Angeles'. For more zones, see User Settings -> Preferences.

Filters

name partial_match? description
plugin no The plugin to filter on.
view no The view to filter on.

Example Responses

Click on a format below to see an example response:

JSON XML
[{
  "plugin": "cpu-0",
  "view": "cpu-idle",
  "graph_href": "test.com/graph",
  "links": [
    {"rel":"self","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND/monitoring_metrics/cpu-0:cpu-idle"},
    {"rel":"data","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND/monitoring_metrics/cpu-0:cpu-idle/data"}
  ],
  "actions": [

  ]
},{
  "plugin": "cpu-0",
  "view": "cpu-idle",
  "graph_href": "test.com/graph",
  "links": [
    {"rel":"self","href":"/api/clouds/888/instances/RESOURCE_1620899759;RAND/monitoring_metrics/cpu-0:cpu-idle"},
    {"rel":"data","href":"/api/clouds/888/instances/RESOURCE_1620899759;RAND/monitoring_metrics/cpu-0:cpu-idle/data"}
  ],
  "actions": [

  ]
}]
<?xml version="1.0" encoding="UTF-8"?>
<monitoring_metrics>
  <monitoring_metric>
    <plugin>cpu-0</plugin>
    <view>cpu-idle</view>
    <graph_href>test.com/graph</graph_href>
    <links>
      <link rel="self" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND/monitoring_metrics/cpu-0:cpu-idle"/>
      <link rel="data" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND/monitoring_metrics/cpu-0:cpu-idle/data"/>
    </links>
    <actions/>
  </monitoring_metric>
  <monitoring_metric>
    <plugin>cpu-0</plugin>
    <view>cpu-idle</view>
    <graph_href>test.com/graph</graph_href>
    <links>
      <link rel="self" href="/api/clouds/888/instances/RESOURCE_1620899759;RAND/monitoring_metrics/cpu-0:cpu-idle"/>
      <link rel="data" href="/api/clouds/888/instances/RESOURCE_1620899759;RAND/monitoring_metrics/cpu-0:cpu-idle/data"/>
    </links>
    <actions/>
  </monitoring_metric>
</monitoring_metrics>

show

Shows attributes of a single monitoring metric. Making a request to the graph_href will return a png image corresponding to that monitoring metric.

URLs
GET /api/clouds/:cloud_id/instances/:instance_id/monitoring_metrics/:id
HTTP response code
200 OK
Content-type
application/vnd.rightscale.monitoring_metric

Required roles

Required settings

Parameters

name required type values regexp blank? description
period no String now, day, yday, week, lweek, month, quarter, year * no The time scale for which the graph is generated. Default is 'day'.
size no String thumb, tiny, small, large, xlarge * no The size of the graph to be generated. Default is 'small'.
title no String * * no The title of the graph.
tz no String * * no The time zone in which the graph will be displayed. Default will be 'America/Los_Angeles'. For more zones, see User Settings -> Preferences.

Example Responses

Click on a format below to see an example response:

JSON XML
{
  "plugin": "cpu-0",
  "view": "cpu-idle",
  "graph_href": "test.com/graph",
  "links": [
    {"rel":"self","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND/monitoring_metrics/cpu-0:cpu-idle"},
    {"rel":"data","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND/monitoring_metrics/cpu-0:cpu-idle/data"}
  ],
  "actions": [

  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<monitoring_metric>
  <plugin>cpu-0</plugin>
  <view>cpu-idle</view>
  <graph_href>test.com/graph</graph_href>
  <links>
    <link rel="self" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND/monitoring_metrics/cpu-0:cpu-idle"/>
    <link rel="data" href="/api/clouds/888/instances/RESOURCE_2014175382;RAND/monitoring_metrics/cpu-0:cpu-idle/data"/>
  </links>
  <actions/>
</monitoring_metric>

data

Gives the raw monitoring data for a particular metric. The response will include different variables associated with that metric and the data points for each of those variables.

To get the data for a certain duration, for e.g. for the last 10 minutes(600 secs), provide the variables start="-600" and end="0".

URLs
GET /api/clouds/:cloud_id/instances/:instance_id/monitoring_metrics/:id/data
HTTP response code
200 OK
Content-type
application/vnd.rightscale.monitoring_metric_data

Required roles

Required settings

Parameters

name required type values regexp blank? description
end yes String * ^(-\d+)|0$ no An integer number of seconds from current time. e.g. -150 or 0
start yes String * ^(-\d+)|0$ no An integer number of seconds from current time. e.g. -300

Example Responses

Click on a format below to see an example response:

JSON XML
{
  "start": "2011/06/16 19:31:40 +0000",
  "end": "2011/06/16 19:33:50 +0000",
  "variables_data": [
    {
      "variable": "value",
      "points": [
        70.0,
        80.0,
        90.0
      ]
    }
  ],
  "links": [
    {"rel":"self","href":"/api/clouds/888/instances/RESOURCE_2014175382;RAND/monitoring_metrics/cpu-0:cpu-idle/data"}
  ],
  "actions": [

  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<monitoring_metric_data>
  <start>2011-06-16 19:31:40</start>
  <end>2011-06-16 19:33:50</end>
  <variables_data>
    <variable_data>
      <variable>value</variable>
      <points>
        <point>70.0</point>
        <point>80.0</point>
        <point>90.0</point>
      </points>
    </variable_data>
  </variables_data>
  <links>
    <link href="/api/clouds/888/instances/RESOURCE_2014175382;RAND/monitoring_metrics/cpu-0:cpu-idle/data" rel="self"/>
  </links>
  <actions/>
</monitoring_metric_data>