メトリックとスナップショット API

このページでは、メトリックデータ情報や、モニタリング対象環境のさまざまなタイプのアクティビティに関する情報を取得できる、コントローラメトリックとイベント API メソッドについて説明します。さらに、メトリックを保持する期間を設定することもできます。

注: または、Splunk AppDynamicsCisco AppDynamics DEXTER 拡張機能を使用して Splunk AppDynamics データをクエリすることもできます。ただし、コントローラのパフォーマンスに影響を与える可能性があるため、この拡張ツールはピーク時に実行してはなりません。

Data Retention for Metric and Snapshot API

Default Granularity for Time Ranges

The granularity depends on the time range when fetching data. The table below specifies the granularity of the data for different time ranges.

Time RangeGranularity
0–1459 minutes (0-24.20 hours)

1 minute

1460-2940 minutes (24.20 - 49 hours)

10 minutes

> 49 hours60 minutes

If no data is fetched or the time range is invalid, naturally, no data granularity will be applied.

Data Aggregation

You can set the rollup query string parameter to true to request aggregated data (one datapoint). You can disable data aggregation by setting rollup=false. The default value is true.

For example: /controller/rest/applications/application_name/metrics?rollup=true

Time Ranges

You can set the time range for data with the query string parameter time-range-type. The following values are supported for time-range-type:

  • BEFORE_NOW
  • BEFORE_TIME
  • AFTER_TIME
  • BETWEEN_TIMES

Request Custom Data Granularity

To request data at a custom granularity, do the following:

  • Set rollup=true or do not specify the rollup property.
  • Set the desired time range for the aggregated data with the query string parameter time-range .
  • Configure the range with time-range with a frequency:
    • For BETWEEN_TIMES , set the frequency by specifying the start and end times with the parameters start-time and end-time.
    • For BEFORE_NOW , specify the parameter duration-in-mins.
    • For AFTER_TIME , specify the parameters duration-in-mins and the start-time.
    • For BEFORE_TIME , specify the parameters duration-in-mins and the end-time.

Example Requests

Configured Range and FrequencyDescription of Data Granularity
?rollup=true&time-range-type=BETWEEN_TIMES&start-time=1682841600000&end-time=1682841603600Return the metric data aggregated between the specified start and end times (60 minutes).
?rollup=true&time-range-type=BEFORE_NOW&duration-in-mins=120Return the metric data aggregated 120 minutes ago until now.
?rollup=true&time-range-type=BEFORE_TIME&end-time=1682841603600&duration-in-mins=15Return the metric data aggregated from 15 minutes before end-time until the end-time .

See Using Time Ranges for descriptions of the parameters and more examples.

Retrieve Metric Hierarchy

This API returns information about the metric tree structure. Because it retrieves the first generation of child elements, you can only expand the children of the folder type.

  • If a child element is a container item in the response, its type value is folder .
  • Otherwise, the type value for the child element is leaf .

You can recurse the metric tree structure further by using the metric-path Metric Data API.

Format

 GET /controller/rest/applications/application_name/metrics

Input parameters

Parameter Name Parameter Type Value Mandatory

application_name

URI

The name or ID of the business or EUM (browser/mobile/IoT) application. Use the call to get the application ID in the Application Model API.

Yes

output

Query

HTTP Request parameter included as part of the URL to change the output format.Valid values are XML (default) or JSON.

No

metric-path Query

The path to the metric in the metric hierarchy.

注: When including the pipe ( | ) or backslash ( \ ) special characters in the metric-path, you must include an additional backslash to indicate escape.
No

Example

curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E/metrics"
<metric-items><metric-item>
<type>folder</type>
<name>Backends</name>
</metric-item>
<metric-item>
<type>folder</type>
<name>Service Endpoints</name>
</metric-item>
<metric-item>
<type>folder</type>
<name>End User Experience</name>
</metric-item>
<metric-item>
<type>folder</type>
<name>Errors</name>
</metric-item>
<metric-item>
<type>folder</type>
<name>Business Transaction Performance</name>
</metric-item>
<metric-item>
<type>folder</type>
<name>Information Points</name>
</metric-item>
<metric-item>
<type>folder</type>
<name>Overall Application Performance</name>
</metric-item>
<metric-item>
<type>folder</type>
<name>Application Infrastructure Performance</name>
</metric-item>
<metric-item>
<type>folder</type>
<name>Mobile</name>
</metric-item></metric-items>

Retrieve Metric Data

The metric data v2 method lets you get values generated for metrics. This API enables you to retrieve metrics at one minute granularity for any 24 hour period within the last eight days.To use this method, specify the following parameters to the API:
  • The path of the metric to retrieve.
  • The time frame for the data.

The table below specifies the granularity of the data for different time ranges.​​

Time RangeGranularity
> 24 hours ​60 minute​​
<=24 hours (requested range is within 8 days from the API request time) ​1 minute​​
<=24 hours (requested range is older than the last 8 days from the API request time)60 minutes

If no data is fetched or the time range is invalid, no data granularity will be applied.​​

Using the Controller UI is the simplest way to learn how to construct the metric path and time range-related parameters.

  1. Right-click on the metric in the Metric Browser.
  2. Select Copy REST URL. The copied URL includes the path to this metric and time range selected in the UI.
  3. Certain clients can accept and properly encode the full path value as the metric path parameter.
  4. Hover over the metric in the tree or copy it using the Copy Full Path option in the right-click menu.

Certain examples below are shown with the full path value rather than the fully encoded URL value. If you test calls with the full path, avoid using a pipe character at the start or end of the path.

These sections provide additional details and examples for the metric data method:

Format

 GET /controller/rest/applications/application_name/metric-data-v2

Input Parameters

metric-pathQuery

The path to the metric in the metric hierarchy.

The value for this parameter must be in string format.

When including the pipe ( | ) or backslash ( \ ) special characters in the metric-path, you must include an additional backslash to indicate escape.

Yes
rollupQueryBy default, the values of the returned metrics are rolled up into a single data point (rollup=true). To get separate results for all values within the time range, set the Rollup parameter to false in the query.The values for this parameter can be true or false.No
time-range-typeQuery

The option to specify the time range. The values can be:

  • ​BEFORE_NOW​ ​​
  • ​BEFORE_TIME​ ​​
  • AFTER_TIME​ ​​
  • BETWEEN_TIMES​ ​​​​
Yes
duration-in-minsQuery

The duration to return the metric data.

The value must be an integer.

No
outputQuery

HTTP Request parameter included as part of the URL to change the output format.

The values can be XML (default) or JSON.

No

Additional mandatory parameters for specifying time ranges are described in Using Time Ranges.

Example

Retrieve metric values for a metric at an absolute path:

curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E/metric-data-v2?metric-path=Overall%20Application%20Performance%7CAverage%20Response%20Time%20%28ms%29&time-range-type=BEFORE_NOW&duration-in-mins=15"<metric-datas><metric-data>
<metric-data-v2s>
  <metric-data-v2>
    <metricId>2339</metricId>
    <metricPath>Overall Application Performance|Average Response Time (ms)</metricPath>
    <metricName>BTM|Application Summary|Average Response Time (ms)</metricName>
    <frequency>ONE_MIN</frequency>
    <metricValues>
      <metric-value>
        <startTimeInMillis>1450562160000</startTimeInMillis>
        <value>302</value>
        <min>0</min>
        <max>15212</max>
        <current>15212</current>
        <sum>97800</sum>
        <count>324</count>
        <standardDeviation>0.0</standardDeviation>
        <occurrences>0</occurrences>
        <useRange>true</useRange>
      </metric-value>
    </metricValues>
  </metric-data-v2>
</metric-data-v2s>

Metric Response Values

Metrics results include the following fields:

NameDefinition
currentThe value for the current minute. This is used only when the time rollup type used by the Controller is current.
countThe number of times the agent collected the metric over the selected time period.
min, maxThe minimum and maximum values reported across the selected time period. These are not used for all metric types.
occurrencesThe number of data samples taken by the Controller to calculate the standard deviation.
standardDeviationThe intermediate values calculated by the Controller during time rollup used to calculate standard deviation. See Dynamic Baselines.
startTimeInMillisThe startTimeInMillis is the start time of the time range to which the result metric data applies in UNIX epoch time.
sumThe total accumulated value for the metric over the selected time period.
useRangeUsed internally by the Controller to process the metric.
valueThe value value is one of the following for all metric values reported across the configured evaluation time length:
  • Arithmetic average: if the metric time rollup type is average.
  • Sum: if the metric time rollup type is sum.
  • Latest: if the metric time rollup type is current.
注: min and max values are not available for any count-based or sum-based metric except when the metric is rolled up to hourly or daily data points. These metrics include errors per minute, calls per minute, and so on.

Using Wildcards

When you copy the REST URL in the Metric Browser, you get the path to a specific metric within a specific application and tier. Alternatively, you can use wildcard characters in one or more steps in the URL path to get metric data for entities, including multiple business transactions, tiers, or nodes.

The following format examples show where to put wildcard characters in various metric paths to achieve particular results. For reading clarity, these format examples use the Full Path for the metric rather than the REST URL. For a full working example, click the expanding link under each format listing:

  • Retrieve the app agent availability time for all tiers in the application using a wildcard for the tier name:

    Request
    <base-URL-of-the-Controller>/controller/rest/applications/ECommerce_E2E-Fulfillment/metric-data-v2?metric-path=Application Infrastructure Performance|*|Agent|App|Availability&time-range-type=BEFORE_NOW&duration-in-mins=15
    Full Example:
    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E-Fulfillment/metric-data-v2?metric-path=Application%20Infrastructure%20Performance%7C*%7CAgent%7CApp%7CAvailability&time-range-type=BEFORE_NOW&duration-in-mins=15"
    
    <metric-data-v2s>
      <metric-data-v2>
      <metricId>2329</metricId>
        <metricPath>Application Infrastructure Performance|Fulfillment-Services|Agent|App|Availability</metricPath>
        <metricName>Agent|App|Availability</metricName>
        <frequency>ONE_MIN</frequency>
        <metricValues>
          <metric-value-v2>
            <startTimeInMillis>1450562460000</startTimeInMillis>
            <value>1</value>
            <min>0</min>
            <max>0</max>
            <current>1</current>
            <sum>15</sum>
            <count>15</count>
            <standardDeviation>0.0</standardDeviation>
            <occurrences>0</occurrences>
            <useRange>false</useRange>
          </metric-value-v2>
        </metricValues>
      </metric-data-v2>
      <metric-data-v2>
        <metricId>2329</metricId>
        <metricPath>Application Infrastructure Performance|Fulfillment-Client-Services|Agent|App|Availability</metricPath>
        <metricName>Agent|App|Availability</metricName>
        <frequency>ONE_MIN</frequency>
        <metricValues>
          <metric-value>
            <startTimeInMillis>1450562460000</startTimeInMillis>
            <value>1</value>
            <min>0</min>
            <max>0</max>
            <current>1</current>
            <sum>15</sum>
            <count>15</count>
            <standardDeviation>0.0</standardDeviation>
            <occurrences>0</occurrences>
            <useRange>false</useRange>
          </metric-value>
        </metricValues>
      </metric-data-v2>
    </metric-data-v2s>
    
  • Retrieve the CPU % Busy metric for all the nodes in all tiers using a wildcard for the tier and node names:

    /controller/rest/applications/ECommerce_E2E-Fulfillment/metric-data-v2?metric-path=Application Infrastructure Performance|*|Individual Nodes|*|Hardware Resources|CPU|%Busy&time-range-type=BEFORE_NOW&duration-in-mins=15
    Full Example:
    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E-Fulfillment/metric-data-v2?metric-path=Application%20Infrastructure%20Performance%7C*%7CIndividual%20Nodes%7C*%7CHardware%20Resources%7CCPU%7C%25Busy&time-range-type=BEFORE_NOW&duration-in-mins=15"
    
    <metric-data-v2s>
      <metric-data-v2>
        <metricId>2231</metricId>
        <metricPath>Application Infrastructure Performance|Fulfillment-Client-Services|Individual Nodes|FulfillmentClient|Hardware Resources|CPU|%Busy</metricPath>
        <metricName>Hardware Resources|CPU|%Busy</metricName>
        <frequency>ONE_MIN</frequency>
        <metricValues>
          <metric-value-v2>
            <startTimeInMillis>1450563000000</startTimeInMillis>
            <value>10</value>
            <min>2</min>
            <max>82</max>
            <current>6</current>
            <sum>4474</sum>
            <count>450</count>
            <standardDeviation>0.0</standardDeviation>
            <occurrences>0</occurrences>
            <useRange>true</useRange>
          </metric-value-v2>
        </metricValues>
      </metric-data-v2>
      <metric-data-v2>
        <metricId>2231</metricId>
        <metricPath>Application Infrastructure Performance|Fulfillment-Services|Individual Nodes|Fulfillment|Hardware Resources|CPU|%Busy</metricPath>
        <metricName>Hardware Resources|CPU|%Busy</metricName>
        <frequency>ONE_MIN</frequency>
        <metricValues>
          <metric-value-v2>
            <startTimeInMillis>1450563000000</startTimeInMillis>
            <value>10</value>
            <min>2</min>
            <max>82</max>
            <current>6</current>
            <sum>4478</sum>
            <count>450</count>
            <standardDeviation>0.0</standardDeviation>
            <occurrences>0</occurrences>
            <useRange>true</useRange>
          </metric-value-v2>
        </metricValues>
      </metric-data-v2>
    </metric-data-v2s>
    
  • Retrieve the Calls per Minute metric for all the business transactions on the ECommerce tier using a wildcard for the business transaction name:

    /controller/rest/applications/ACME Book Store Application/metric-data-v2?metric-path=Business Transaction Performance|Business Transactions|ECommerce Server|*|Calls per Minute&time-range-type=BEFORE_NOW&duration-in-mins=15
    Full Example:
    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E/metric-data?metric-path=Business%20Transaction%20Performance%7CBusiness%20Transactions%7CECommerce-Services%7C*%7CCalls%20per%20Minute&time-range-type=BEFORE_NOW&duration-in-mins=15"
    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E/metric-data-v2?metric-path=Business%20Transaction%20Performance%7CBusiness%20Transactions%7CECommerce-Services%7C*%7CCalls%20per%20Minute&time-range-type=BEFORE_NOW&duration-in-mins=15"
    <metric-data-v2s>
      <metric-data-v2>
        <metricId>4042</metricId>
        <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/json/cart/all.GET|Calls per Minute</metricPath>
        <metricName>BTM|BTs|BT:125|Component:9|Calls per Minute</metricName>
        <frequency>ONE_MIN</frequency>
        <metricValues>
          <metric-value-v2>
            <startTimeInMillis>1450563420000</startTimeInMillis>
            <value>0</value>
            <min>0</min>
            <max>0</max>
            <current>0</current>
            <sum>5</sum>
            <count>30</count>
            <standardDeviation>0.0</standardDeviation>
            <occurrences>0</occurrences>
            <useRange>false</useRange>
          </metric-value>
        </metricValues>
      </metric-data-v2>
      <metric-data-v2>
        <metricId>9784</metricId>
        <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/appdynamicspilot/WEB-INF|Calls per Minute</metricPath>
        <metricName>BTM|BTs|BT:183|Component:9|Calls per Minute</metricName>
        <frequency>ONE_MIN</frequency>
        <metricValues>
          <metric-value-v2>
            <startTimeInMillis>1450563420000</startTimeInMillis>
            <value>0</value>
            <min>2147483647</min>
            <max>-2147483648</max>
            <current>0</current>
            <sum>0</sum>
            <count>0</count>
            <standardDeviation>0.0</standardDeviation>
            <occurrences>0</occurrences>
            <useRange>false</useRange>
          </metric-value>
        </metricValues>
      </metric-data-v2>
      <metric-data-v2>
      <metricId>5574</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|/appdynamicspilot/404.jsp|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:140|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value-v2>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value-v2>
      </metricValues>
    </metric-data-v2>
    ...
    <metric-data-v2>
      <metricId>4090</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|UserLogOut.memberLogOut|Calls per Minute</metricPath>
      <metricName>BTM|BTs|BT:128|Component:9|Calls per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450563420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data-v2>
    </metric-data-v2s>
    
    
  • Retrieve data for multiple metrics for the ViewCart.addToCart transaction on the ECommerce-Services server:

    /controller/rest/applications/ECommerce_E2E/metric-data-v2?metric-path=Business Transaction Performance|Business Transactions|ECommerce Server|ViewCart.addToCart|*&time-range-type=BEFORE_NOW&duration-in-mins=15
    Full Example:
    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E/metric-data-v2?metric-path=Business%20Transaction%20Performance%7CBusiness%20Transactions%7CECommerce-Services%7CViewCart.addToCart%7C*&time-range-type=BEFORE_NOW&duration-in-mins=15"
    
    <metric-data-v2s><metric-data-v2>
      <metricId>4155</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Average Response Time (ms)</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Average Response Time (ms)</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>28</value>
          <min>0</min>
          <max>32</max>
          <current>0</current>
          <sum>84</sum>
          <count>3</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data-v2>
    <metric-data-v2>
      <metricId>4159</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Number of Very Slow Calls</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Number of Very Slow Calls</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data-v2>
    <metric-data-v2>
      <metricId>4157</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Errors per Minute</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Errors per Minute</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data-v2>
    <metric-data-v2>
      <metricId>4161</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Average CPU Used (ms)</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Average CPU Used (ms)</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>18</value>
          <min>0</min>
          <max>20</max>
          <current>0</current>
          <sum>54</sum>
          <count>3</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data-v2>
    <metric-data-v2>
      <metricId>4160</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Stall Count</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Stall Count</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data-v2>
    <metric-data-v2>
      <metricId>4411</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|95th Percentile Response Time (ms)</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|95th Percentile Response Time (ms)</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>28</value>
          <min>0</min>
          <max>32</max>
          <current>0</current>
          <sum>84</sum>
          <count>3</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>true</useRange>
        </metric-value>
      </metricValues>
    </metric-data-v2>
    ...
    <metric-data-v2>
      <metricId>4158</metricId>
      <metricPath>Business Transaction Performance|Business Transactions|ECommerce-Services|ViewCart.addToCart|Number of Slow Calls</metricPath>
      <metricName>BTM|BTs|BT:134|Component:9|Number of Slow Calls</metricName>
      <frequency>ONE_MIN</frequency>
      <metricValues>
        <metric-value>
          <startTimeInMillis>1450566420000</startTimeInMillis>
          <value>0</value>
          <min>2147483647</min>
          <max>-2147483648</max>
          <current>0</current>
          <sum>0</sum>
          <count>0</count>
          <standardDeviation>0.0</standardDeviation>
          <occurrences>0</occurrences>
          <useRange>false</useRange>
        </metric-value>
      </metricValues>
    </metric-data-v2>
    </metric-data-v2s>
    

Disabling Data Rollup

By default, metric data is rolled up for the time frame you request. You can set the rollup parameter to false to get all data points within the time frame. For example:

curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E/metric-data-v2?rollup=false&metric-path=Overall%20Application%20Performance%7CAverage%20Response%20Time%20%28ms%29&time-range-type=BEFORE_NOW&duration-in-mins=15"

<metric-data-v2s>
  <metric-data-v2>
    <metricId>2339</metricId>
    <metricPath>Overall Application Performance|Average Response Time (ms)</metricPath>
    <metricName>BTM|Application Summary|Average Response Time (ms)</metricName>
    <frequency>ONE_MIN</frequency>
    <metricValues>
      <metric-value>
        <startTimeInMillis>1450503540000</startTimeInMillis>
        <value>334</value>
        <min>0</min>
        <max>3340</max>
        <current>2</current>
        <sum>6678</sum>
        <count>20</count>
        <standardDeviation>0.0</standardDeviation>
        <occurrences>0</occurrences>
        <useRange>true</useRange>
      </metric-value>
      <metric-value>
        <startTimeInMillis>1450503600000</startTimeInMillis>
        <value>771</value>
        <min>1</min>
        <max>11235</max>
        <current>4113</current>
        <sum>15424</sum>
        <count>20</count>
        <standardDeviation>0.0</standardDeviation>
        <occurrences>0</occurrences>
        <useRange>true</useRange>
      </metric-value>
      <metric-value>
        <startTimeInMillis>1450503660000</startTimeInMillis>
        <value>215</value>
        <min>0</min>
        <max>4249</max>
        <current>3</current>
        <sum>4306</sum>
        <count>20</count>
        <standardDeviation>0.0</standardDeviation>
        <occurrences>0</occurrences>
        <useRange>true</useRange>
      </metric-value>
  ... 
    </metricValues>
  </metric-data-v2>
</metric-data-v2s>

Using Time Ranges

You can fetch metric data for any time range, including for a range between specific points, such as from 2:00 to 2:15 pm Monday, or for a relative time range.

Time-based input parameters for the metric data API method let you specify a time range in several ways, as described in the following table.

Time Range Input Parameters

Parameter Name Parameter Type Value Mandatory

time-range-type

Query

Possible values are:

  • BEFORE_NOW —must specify the duration-in-mins parameter.
  • BEFORE_TIME —must specify the duration-in-mins and end-time parameters.
  • AFTER_TIME —must specify the duration-in-mins and start-time parameters.
  • BETWEEN_TIMES —must specify the start-time and end-time parameters. The BETWEEN_TIMES range includes the start- time and excludes the end-time.

Yes

duration-in-mins

Query

Duration (in minutes) to return the metric data.

If time-range-type is BEFORE_NOW, BEFORE_TIME, or AFTER_TIME

start-time

Query

Start time (in milliseconds) from which the metric data is returned in UNIX epoch time.

If time-range-type is AFTER_TIME or BETWEEN_TIMES

end-time

Query

End time (in milliseconds) until which the metric data is returned in UNIX epoch time.

If time-range-type is BEFORE_TIME or BETWEEN_TIMES

Examples

Most examples on this page use the previous 15 minutes as the request time range. The following format examples show other ways you can define the time range for the request.

  • Time range of the 15 minutes after December 19, 2015 5:40:00 AM GMT:

    ?time-range-type=AFTER_TIME&start-time=1450532400000&duration-in-mins=15
  • Time range of the 15 minutes before December 19, 2015 6:00:00 AM GMT.

    ?time-range-type=BEFORE_TIME&end-time=1450533600000&duration-in-mins=15
  • Time range between December 19, 2015 6:00:00 AM GMT and December 19, 2015 6:30:00 AM GMT:

    ?time-range-type=BETWEEN_TIMES&start-time=1450533600000&end-time=1450535400000

Retrieving All Other Traffic Business Transaction Metrics

The All Other Traffic business transaction is a type of business transaction that aggregates traffic for new transactions once the business transaction registration limits are reached and uses the special identifier, _APPDYNAMICS_DEFAULT_TX_, in API URI paths. See Business Transactions.

The following shows an example of retrieving the average CPU used by the All Other Traffic business transaction:

curl --user user1@customer1:your_password "http://demo.appdynamics.com:8090/controller/rest/applications/ACME%20Book%20Store%20Application/metric-data-v2?metric-path=Business%20Transaction%20Performance%7CBusiness%20Transactions%7CECommerce%20Server%7C_APPDYNAMICS_DEFAULT_TX_%7CAverage%20CPU%20Used%20%28ms%29&time-range-type=BEFORE_NOW&duration-in-mins=15"

<metric-data-v2s>
  <metric-data-v2>
    <metricId>4000</metricId>
    <metricPath>Business Transaction Performance|Business Transactions|ECommerce Server|_APPDYNAMICS_DEFAULT_TX_|Average CPU Used (ms)</metricPath>
    <metricName>BTM|BTs|BT:78|Component:12|Average CPU Used (ms)</metricName>
    <frequency>ONE_MIN</frequency>
    <metricValues>
      <metric-value>
        <startTimeInMillis>1450570800000</startTimeInMillis>
        <value>22</value>
        <min>0</min>
        <max>50</max>
        <current>20</current>
        <sum>3140</sum>
        <count>146</count>
        <standardDeviation>0.0</standardDeviation>
        <occurrences>0</occurrences>
        <useRange>true</useRange>
      </metric-value>
    </metricValues>
  </metric-data-v2>
</metric-data-v2s>

トランザクション スナップショットを取得する

スナップショットには、要求セグメントごとにトランザクションの詳細が含まれています。時間範囲パラメータは、メトリックを取得する場合と同じようにスナップショットで使用されます。同様に、相対時間範囲や特定の範囲を指定することもできます。 「時間範囲の使用」を参照してください。

形式

GET /controller/rest/applications/application_name/request-snapshots

入力パラメータ

パラメータ名 Parameter Type 必須

application_name

URI

アプリケーション名またはアプリケーション ID のいずれかを指定します。

あり

time-range-type

クエリ

可能な値は以下の通りです:

  • BEFORE_NOW:duration-in-mins パラメータを指定する必要があります。
  • BEFORE_TIME:duration-in-mins パラメータと end-time パラメータを指定する必要があります。
  • AFTER_TIME:duration-in-mins パラメータと start-time パラメータを指定する必要があります。
  • BETWEEN_TIMES:start-time パラメータと end-time パラメータを指定する必要があります。[BETWEEN_TIMES] の範囲には start-time が含まれますが、end-time は除外されます。

あり

duration-in-mins

クエリ

データを返す期間(分単位)。

time-range-type が BEFORE_NOW、BEFORE_TIME、または AFTER_TIME の場合

start-time

クエリ

データが返される期間の開始時刻(ミリ秒単位)。

time-range-type が AFTER_TIME または BETWEEN_TIMES の場合

end-time

クエリ

データが返される期間の終了時刻(ミリ秒単位)。

time-range-type が BEFORE_TIME または BETWEEN_TIMES の場合

guids

クエリ

トランザクション スナップショットのカンマ区切りの GUID の配列。指定されていない場合は、指定された時間範囲内のすべてのスナップショットが取得されます。

いいえ

archived

クエリ

アーカイブされたスナップショットを取得する場合は true。デフォルトは false です。

いいえ

deep-dive-policy

クエリ

適用するカンマ区切りのスナップショット ポリシー フィルタの配列。有効な値は次のとおりです。

  • SLA_FAILURE
  • TIME_SAMPLING
  • ERROR_SAMPLING
  • OCCURRENCE_SAMPLING
  • ON_DEMAND
  • APPLICATION_STARTUP
  • SLOW_DIAGNOSTIC_SESSION
  • ERROR_DIAGNOSTIC_SESSION
  • POLICY_FAILURE_DIAGNOSTIC_SESSION
  • DIAGNOSTIC_SESSION
  • INFLIGHT_SLOW_SESSION

いいえ

application-component-ids

クエリ

フィルタ処理するカンマ区切りの階層 ID の配列。デフォルトは、アプリケーション内のすべての階層です。

いいえ

application-component-node-ids

クエリ

カンマ区切りのノード ID フィルタの配列。デフォルトは、アプリケーション内のすべてのノードです。

いいえ

business-transaction-ids

クエリ

カンマ区切りのビジネストランザクション ID フィルタの配列。デフォルトは、アプリケーション内のすべてのビジネストランザクションです。

いいえ

user-experience

クエリ

カンマ区切りのユーザ エクスペリエンス フィルタの配列。有効な値は次のとおりです。

  • NORMAL
  • SLOW
  • VERY_SLOW
  • STALL
  • ERROR

いいえ

first-in-chain

クエリ

true の場合は、チェーンからの最初の要求のみを取得します。デフォルトは false です。

いいえ

need-props

クエリ

true の場合、次のスナップショットプロパティの値が出力に含まれます。これらの値は、data-collector-type パラメータの値に対応します。false の場合、デフォルトではこれらの値が出力で空になります。

  • errorDetails
  • errorIDs
  • httpParameters
  • businessData
  • cookies
  • httpHeaders
  • sessionKeys
  • responseHeaders
  • logMessages
  • transactionProperties
  • transactionEvents
  • dotnetProperty

いいえ

need-exit-calls

クエリ

true の場合は、終了コールが結果に含まれます。デフォルトは false です。

いいえ

execution-time-in-milis

クエリ

設定されている場合は、この値を超える実行時間を要する要求のデータのみを取得します。

いいえ

session-id

クエリ

設定した場合は、このセッション ID のデータのみを取得します。

いいえ

user-principal-id

クエリ

設定した場合は、このユーザログインのデータのみを取得します。

いいえ

error-ids

クエリ

フィルタ処理に使用するカンマ区切りのエラーコードの配列。デフォルトでは、すべてのエラーコードが取得されます。

いいえ

starting-request-id、ending-request-id

クエリ

設定した場合は、この要求 ID の範囲に対するデータのみ取得します。

いいえ

error-occurred

クエリ

true の場合は、エラーリクエストのみを取得します。デフォルトは false です。

いいえ

diagnostic-snapshot

クエリ

true の場合は、診断スナップショットのみを取得します。デフォルトは false です。

いいえ

bad-request

クエリ

true の場合は、遅延およびエラーリクエストのみを取得します。デフォルトは false です。

いいえ

diagnostic-session-guid

クエリ

フィルタ処理するカンマ区切りの診断セッション GUID の配列。

いいえ

data-collector-name

クエリ

data-collector-value とともに使用され、データコレクタの値に基づいてスナップショット収集をフィルタ処理します。

いいえ

data-collector-value

クエリ

data-collector-name とともに使用され、データコレクタの値に基づいてスナップショット収集をフィルタ処理します。

data-collector-name が設定されている場合。

data-collector-type

クエリ

data-collector-name および data-collector-value とともに使用され、データコレクタの値に基づいてスナップショット収集をフィルタ処理します。一部の値にはスペースが含まれています。すべての値で大文字と小文字が区別され、スペースが必要な場所が示されています。有効な値は次のとおりです。

  • Error IDs
  • Stack Traces
  • Error Detail
  • Http Parameter
  • Business Data(このタイプはメソッド呼び出しのデータコレクタです)。
  • Cookie
  • Http Header
  • Session Key
  • Response Header
  • Log Message
  • Transaction Property
  • Transaction Event
  • Dotnet Property
  • isProtoBuf
  • EUM Request GUID

出力

クエリ

出力形式を変更するために URL の一部として含まれている HTTP リクエストパラメータ。有効な値は XML(デフォルト)または JSON です。

いいえ

maximum-results クエリ指定されている場合、この数値が返される最大結果数となります。指定されていない場合は、最大でデフォルト値である 600 件の結果が返される可能性があります。いいえ

  • ACME Book Store のトランザクション スナップショットのリストを取得します。

    /controller/rest/applications/ECommerce_E2E-Fulfillment/request-snapshots?time-range-type=BEFORE_NOW&duration-in-mins=5
    詳細な例:
    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E-Fulfillment/request-snapshots?time-range-type=BEFORE_NOW&duration-in-mins=5"
    <request-segment-datas><request-segment-data>
    <id>0</id>
    <archived>false</archived>
    <requestGUID>18a9ae17-33a8-4d24-b3fa-558fe42b98b5</requestGUID>
    <businessTransactionId>113</businessTransactionId>
    <applicationId>8</applicationId>
    <applicationComponentId>14</applicationComponentId>
    <applicationComponentNodeId>13</applicationComponentNodeId>
    <async>false</async>
    <threadID>58</threadID>
    <threadName>http-nio-8080-exec-8</threadName>
    <localStartTime>1450574075422</localStartTime>
    <serverStartTime>1450574075422</serverStartTime>
    <firstInChain>true</firstInChain>
    <callChain>Component:14</callChain>
    <localID>0</localID>
    <errorOccured>false</errorOccured>
    <hasDeepDiveData>true</hasDeepDiveData>
    <userExperience>NORMAL</userExperience>
    <timeTakenInMilliSecs>3693</timeTakenInMilliSecs>
    <cpuTimeTakenInMilliSecs>19</cpuTimeTakenInMilliSecs>
    <warningThreshold>5318 ms. 3.0x of standard deviation [453.7 ms] for moving average [3956.8 ms] (minimum baseline: 200 ms) for the last 11617 minutes.</warningThreshold>
    <criticalThreshold>5772 ms. 4.0x of standard deviation [453.7 ms] for moving average [3956.8 ms] (minimum baseline: 600 ms) for the last 11617 minutes.</criticalThreshold>
    <summary>Scheduled Snapshots: one every 10 minutes.</summary>
    <errorSummary></errorSummary>
    <diagnosticSessionGUID></diagnosticSessionGUID>
    <deepDivePolicy>TIME_SAMPLING</deepDivePolicy>
    <delayedDeepDive>false</delayedDeepDive>
    <delayedDeepDiveOffSet>0</delayedDeepDiveOffSet>
    <exitCallsDataTruncated>false</exitCallsDataTruncated>
    <URL>/appdynamicspilot/rest/fulfillment</URL>
    <errorIDs/>
    <errorDetails/>
    <httpParameters/>
    <businessData/>
    <cookies/>
    <httpHeaders/>
    <sessionKeys/>
    <responseHeaders/>
    <logMessages/>
    <transactionProperties/>
    <transactionEvents/>
    <unresolvedCallInCallChain>false</unresolvedCallInCallChain>
    <dotnetProperty/>
    <endToEndLatency>-1</endToEndLatency>
    </request-segment-data>
    ...
    <request-segment-data>
    <id>0</id>
    <archived>false</archived>
    <requestGUID>bfce5066-2409-4a4b-a869-6afcc06614d6</requestGUID>
    <businessTransactionId>113</businessTransactionId>
    <applicationId>8</applicationId>
    <applicationComponentId>14</applicationComponentId>
    <applicationComponentNodeId>13</applicationComponentNodeId>
    <async>false</async>
    <threadID>60</threadID>
    <threadName>http-nio-8080-exec-10</threadName>
    <localStartTime>1450574082926</localStartTime>
    <serverStartTime>1450574082926</serverStartTime>
    <firstInChain>true</firstInChain>
    <callChain>Component:14</callChain>
    <localID>0</localID>
    <errorOccured>false</errorOccured>
    <hasDeepDiveData>true</hasDeepDiveData>
    <userExperience>NORMAL</userExperience>
    <timeTakenInMilliSecs>3634</timeTakenInMilliSecs>
    <cpuTimeTakenInMilliSecs>16</cpuTimeTakenInMilliSecs>
    <warningThreshold>5318 ms. 3.0x of standard deviation [453.7 ms] for moving average [3956.8 ms] (minimum baseline: 200 ms) for the last 11617 minutes.</warningThreshold>
    <criticalThreshold>5772 ms. 4.0x of standard deviation [453.7 ms] for moving average [3956.8 ms] (minimum baseline: 600 ms) for the last 11617 minutes.</criticalThreshold>
    <summary>[null]</summary>
    <errorSummary></errorSummary>
    <diagnosticSessionGUID></diagnosticSessionGUID>
    <deepDivePolicy>CROSS_APP_POLICY</deepDivePolicy>
    <delayedDeepDive>false</delayedDeepDive>
    <delayedDeepDiveOffSet>0</delayedDeepDiveOffSet>
    <exitCallsDataTruncated>false</exitCallsDataTruncated>
    <URL>/appdynamicspilot/rest/fulfillment</URL>
    <errorIDs/>
    <errorDetails/>
    <httpParameters/>
    <businessData/>
    <cookies/>
    <httpHeaders/>
    <sessionKeys/>
    <responseHeaders/>
    <logMessages/>
    <transactionProperties/>
    <transactionEvents/>
    <unresolvedCallInCallChain>false</unresolvedCallInCallChain>
    <dotnetProperty/>
    <endToEndLatency>-1</endToEndLatency>
    </request-segment-data>
    </request-segment-datas>
  • HTTP パラメータ データ コレクタに関連付けられているスナップショットフィールドを含む、トランザクション スナップショットのリストを取得します。

    /controller/rest/applications/ECommerce_E2E-Fulfillment/request-snapshots?time-range-type=BEFORE_NOW&duration-in-mins=5&data-collector-type=Http Parameter&data-collector-name=param1&data-collector-value=%5B100%5D&need-props=true
    詳細な例:
    curl --user user1@customer1:your_password "http://demo.appdynamics.com/controller/rest/applications/ECommerce_E2E-Fulfillment/request-snapshots?time-range-type=BEFORE_NOW&duration-in-mins=5&data-collector-type=Http%20Parameter&data-collector-name=param1&data-collector-value=%5B100%5D&need-props=true"
    <request-segment-datas><request-segment-data>
    <id>0</id>
    <archived>false</archived>
    <requestGUID>07532d68-42b8-4a79-877a-dedf2912a2cf</requestGUID>
    <businessTransactionId>128</businessTransactionId>
    <applicationId>2</applicationId>
    <applicationComponentId>5</applicationComponentId>
    <applicationComponentNodeId>4</applicationComponentNodeId>
    <async>false</async>
    <threadID>60</threadID>
    <threadName>http-8000-Processor24</threadName>
    <localStartTime>1389164292752</localStartTime>
    <serverStartTime>1389164292752</serverStartTime>
    <firstInChain>true</firstInChain>
    <callChain>Component:5</callChain>
    <localID>0</localID>
    <errorOccured>true</errorOccured>
    <hasDeepDiveData>true</hasDeepDiveData>
    <userExperience>ERROR</userExperience>
    <timeTakenInMilliSecs>105</timeTakenInMilliSecs>
    <cpuTimeTakenInMilliSecs>3839000</cpuTimeTakenInMilliSecs>
    <summary>[Manual Diagnostic Session] - org.hibernate.util.JDBCExceptionReporter : Cannot create PoolableConnectionFactory (Unknown database 'appdy') </summary>
    <errorSummary/>
    <diagnosticSessionGUID>d70a41d9-a96f-46e8-9fbc-31061c6e452f</diagnosticSessionGUID>
    <deepDivePolicy>ON_DEMAND</deepDivePolicy>
    <delayedDeepDive>false</delayedDeepDive>
    <delayedDeepDiveOffSet>0</delayedDeepDiveOffSet>
    <exitCallsDataTruncated>false</exitCallsDataTruncated>
    <URL>/appdynamicspilot/1.bookslist</URL>
    <httpSessionID>088B2A2DD0EF77424DD0EB3346A441F9</httpSessionID>
    <errorIDs>
    <long>29</long>
    </errorIDs>
    <errorDetails>
    <name-value>
    <id>0</id>
    <name>1. org.hibernate.util.JDBCExceptionReporter</name>
    <value>org.hibernate.util.JDBCExceptionReporter : Cannot create PoolableConnectionFactory (Unknown database 'appdy')</value>
    </name-value>
    </errorDetails>
    <httpParameters>
    <name-value>
    <id>0</id>
    <name>param1</name>
    <value>[100]</value>
    </name-value>
    </httpParameters>
    <businessData/>
    <cookies/>
    <httpHeaders/>
    <sessionKeys/>
    <responseHeaders/>
    <logMessages/>
    <transactionProperties>
    <name-value>
    <id>0</id>
    <name>Servlet URI</name>
    <value>/appdynamicspilot/WEB-INF/presentation/bookslist.jsp</value>
    </name-value>
    <name-value>
    <id>0</id>
    <name>ProcessID</name>
    <value>65331</value>
    </name-value>
    </transactionProperties>
    <transactionEvents/>
    <unresolvedCallInCallChain>false</unresolvedCallInCallChain>
    <dotnetProperty/>
    </request-segment-data></request-segment-datas>

Retrieve Controller Audit History

The Controller audit history is a record of the configuration and user activities in the Controller configuration. The ControllerAuditHistory API method returns the audit log for the time range specified. The output format can be JSON or CSV. This information is the same as that found in the audit.log file.

See Platform Log Files and Log File Information by Platform.

Format

GET /controller/ ControllerAuditHistory?startTime=<start-time>&endTime=<end-time>&include=<field>:<value>&exclude=<field>:<value>

Input parameters

Parameter Name Parameter Type Value Mandatory

start-time

Query

Start time in the format: yyyy-MM-dd'T'HH:mm:ss.SSSZ

Yes

end-time

Query

End time in the format: yyyy-MM-dd'T'HH:mm:ss.SSSZ

Yes

time-zone-idQueryTime zoneNo
includeQueryRestricted information in the Controller audit historyNo
excludeQueryRestricted information in the Controller audit historyNo
  • To control the size of the output, the range between the start-time and end-time cannot exceed 24 hours. For periods longer than 24 hours, use multiple queries with consecutive time parameters.
  • Multiple filters of the same type are allowed.
    • The backend API treats included filters with the same < field > with relationship OR
    • Filters with different < field > with relationship AND . There is no direct interaction between include and exclude filters.
  • Each filter needs to be a parameter, e.g. include=filterName1:filterValue1&include=filterName2:filterValue2 . See the below examples:
http://localhost:8080/controller/ControllerAuditHistory?startTime=yyyy-MM-dd&HH:mm:ss.SSSZ&endTime=yyyy-MM-dd&HH:mm:ss.SSSZ?include=filterName1:filterValue1&include=filterName1:filterValue1&exclude=filterName1:filterValue1&exclude=filterName1:filterValue1

Configure Metric Retention by Account

You can configure the Controller to purge stale metrics once a day based on the account.

  • Stale metrics are metrics that have not had new data reported based on the number of days configured.
  • This only deletes EUM and SIM metrics that are more than two days old.
重要: To configure this option, you must be the Controller owner. SaaS customers cannot use this API.

Format

 POST /controller/api/accounts/<account_id>/metricstaleduration/<number_of_days>

Input Parameters

Parameter NameParameter TypeValue
account_id URIThe account ID.
number_of_days IntegerThe number of days you want to retain stale metrics.

Example

警告: SaaS customers cannot use this API because root@system is owned by our SaaS Operations team.
curl -X POST -u root@system:your_password "http://demo.appdynamics.com:8090/controller/api/accounts/2/metricstaleduration/3"

アプリケーションごとにメトリックの保持期間を設定する

アプリケーションに基づいて、古いメトリックを 1 日に 1 回消去するようにコントローラを設定できます。

  • 古いメトリックとは、設定された日数を基に新しいデータが報告されなかったメトリックを指します。
  • これにより、3 日を経過した EUM および SIM メトリックのみが削除されます。

このオプションを設定するには、管理者権限以上の権限が必要です。

形式

POST /controller/api/accounts/<account_id>/applications/<application_name>/metricstaleduration/<number_of_days>

入力パラメータ

パラメータ名Parameter Type
account_id URIアカウント ID。
application_id URIアプリケーション ID。
number_of_days 整数古いメトリックを保持する日数。

curl -X POST -u user1@customer1:your_password "http://demo.appdynamics.com:8090/controller/api/accounts/2/applications/12/metricstaleduration/3"