Retrieve the Metrics for an Add-on
Applies To: Windows Azure Pack
Retrieves the add-on metrics from the specified start date to the specified end date.
Request
Replace <ServiceMgmt> with your Service Management API endpoint address. Replace <AddonId> with the identifier of the add-on for the metrics being gathered.
Method |
Request URI |
HTTP version |
---|---|---|
GET |
https://<ServiceMgmt>:30004/addons/<AddonId>/metrics |
HTTP/1.1 |
URI Parameters
The following table describes the URI parameters.
Uri parameter |
Description |
---|---|
startTime |
Required. The DateTime to start gathering metrics. |
endTime |
Required. The DateTime to stop gathering metrics. |
Request Headers
The following table describes required and optional request headers.
Request header |
Description |
---|---|
Authorization: Bearer |
Required. The authorization bearer token. |
x-ms-principal-id |
Required. The principal identifier. |
x-ms-client-request-id |
Optional. The client request identifier. |
x-ms-client-session-id |
Optional. The client session identifier. |
x-ms-principal-liveid |
Optional. The principal Live identifier. |
Request Body
None.
Response
The response includes an HTTP status code, a set of response headers, and a response body.
Status Code
A successful operation returns status code 200 (OK). Returns 404 if the URI parameters are incorrect.
For information about status codes, see Status and Error Codes (Windows Azure Pack Service Management).
Response Headers
The response for this operation includes standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
Response Body
The following table describes the elements of the response body.
Element name |
Description |
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name |
The metric name. This can include “DailySignupCount” or “TotalSignupCount”. |
||||||||||||
PrimaryAggregationType |
The metric primary aggregation type. Values include “Total” |
||||||||||||
ConfigState |
The metric unit. Values include “Bytes” BytesPerSec”,“Count”,”Megabytes”, “Milliseconds”, ”Other”, ”Percentage”, “Seconds”. |
||||||||||||
TimeGrain |
The metric time grain. |
||||||||||||
StartTime |
The start time for the returned set of metric values. |
||||||||||||
EndTime |
The end time for the returned set of metric values. |
||||||||||||
Values |
A list of metric values. In the case of “Count” aggregation type the following format is used:
|
Example
The following code example shows an Add Add-on Metrics request.
GET https://<Computer>:30004/addons/GoldAhihps8jy/metrics?startTime=2013-06-22T07%3a00%3a00.0000000Z&endTime=2013-06-29T07%3a00%3a00.0000000Z HTTP/1.1
Authorization: Bearer <Token>
x-ms-client-request-id: 5b933374-0387-4f5d-8bce-13f5c067d54b-2013-06-28 18:30:18Z
x-ms-client-session-id: d19ca528-d7bf-4a62-9d4d-03adbb4f6c74
x-ms-principal-id: <COMPUTER>\Administrator
Accept-Language: en-US
x-ms-principal-liveid: <COMPUTER>\Administrator
Host: <Computer>:30004
The following code example shows an Add Add-on Metrics response.
[
{
"Name": "DailySignupCount",
"PrimaryAggregationType": "Total",
"Unit": "Count",
"TimeGrain": "1.00:00:00",
"StartTime": "2013-06-22T07:00:00Z",
"EndTime": "2013-06-29T07:00:00Z",
"Values": [
{
"TimeCreated": "2013-06-22T07:00:00Z",
"Total": 0,
"Minimum": null,
"Maximum": null,
"Count": 1
},
{
"TimeCreated": "2013-06-23T07:00:00Z",
"Total": 0,
"Minimum": null,
"Maximum": null,
"Count": 1
},
{
"TimeCreated": "2013-06-28T07:00:00Z",
"Total": 0,
"Minimum": null,
"Maximum": null,
"Count": 1
}
]
},
{
"Name": "TotalSignupCount",
"PrimaryAggregationType": "Total",
"Unit": "Count",
"TimeGrain": "1.00:00:00",
"StartTime": "2013-06-22T07:00:00Z",
"EndTime": "2013-06-29T07:00:00Z",
"Values": [
{
"TimeCreated": "2013-06-22T07:00:00Z",
"Total": 0,
"Minimum": null,
"Maximum": null,
"Count": 1
},
{
"TimeCreated": "2013-06-27T07:00:00Z",
"Total": 0,
"Minimum": null,
"Maximum": null,
"Count": 1
},
{
"TimeCreated": "2013-06-28T07:00:00Z",
"Total": 0,
"Minimum": null,
"Maximum": null,
"Count": 1
}
]
}
]