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

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

メトリックおよびスナップショット API のデータ保持

時間範囲のデフォルトの粒度

粒度は、データを取得するときの時間範囲に依存します。以下の表では、さまざまな時間範囲のデータの粒度を指定しています。

時間範囲 精度
0 ~ 1459 分(0 ~ 24.20 時間)

1分

1460 ~ 2940 分(24.20 ~ 49 時間)

10分

49 時間超 60 分

データが取得されていないか、時間範囲が無効な場合は、必然的にデータの粒度は適用されません。

データの集約

rollup クエリ文字列パラメータを true に設定すると、集約データ(1 データポイント)を要求できます。rollup=false を設定することで、データ集約を無効にすることができます。デフォルト値は true です。

例: /controller/rest/applications/application_name/metrics?rollup=true

時間範囲

クエリ文字列パラメータ time-range-type を使用して、データの時間範囲を設定できます。time-range-type では、次の値がサポートされています。

  • BEFORE_NOW
  • BEFORE_TIME
  • AFTER_TIME
  • BETWEEN_TIMES

カスタムデータ粒度のリクエスト

カスタム粒度でデータをリクエストするには、次の手順を実行します。

  • rollup=true を設定するか、または rollup プロパティを指定しないでください。
  • クエリ文字列パラメータ time-range を使用して、集約データの目的の時間範囲を設定します。
  • time-range と頻度を使用して範囲を設定します。
    • For BETWEEN_TIMES では、パラメータ start-timeend-time. で開始時刻と終了時刻を指定して頻度を設定します。
    • BEFORE_NOW には、パラメータ duration-in-mins. を指定します。
    • AFTER_TIME には、パラメータ duration-in-minsstart-time. を指定します。
    • BEFORE_TIME には、パラメータ duration-in-minsend-time. を指定します。

リクエスト例

設定された範囲と頻度 データ粒度の説明
?rollup=true&time-range-type=BETWEEN_TIMES&start-time=1682841600000&end-time=1682841603600 指定された開始時刻と終了時刻の間(60 分間)に集約されたメトリックデータが返されます。
?rollup=true&time-range-type=BEFORE_NOW&duration-in-mins=120 120 分前から現在までに集約されたメトリックデータが返されます。
?rollup=true&time-range-type=BEFORE_TIME&end-time=1682841603600&duration-in-mins=15 end-time の 15 分前から end-time までに集約されたメトリックデータが返されます。

パラメータの説明とその他の例については、「時間範囲の使用」を参照してください。

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

CODE
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 Range Granularity
> 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.
    注: When using BEFORE_NOW for time ranges of 12 hours (720 minutes) or greater, the response may omit the final 60 minutes of data. For example, a 12-hour request at 12:45 PM returns 660 minutes of data instead of 720. To retrieve the complete data set, use full-hour boundaries (such as, 1:00 AM to 1:00 PM). Partial-hour ranges (such as, 1:05 AM to 1:05 PM) return incomplete data until the timeframe is older than 24 hours.
  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-path Query

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
rollup Query By 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-type Query

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

  • ​BEFORE_NOW​ ​​
  • ​BEFORE_TIME​ ​​
  • AFTER_TIME​ ​​
  • BETWEEN_TIMES​ ​​​​
Yes
duration-in-mins Query

The duration to return the metric data.

The value must be an integer.

No
output Query

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>
CODE
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>
CODE
<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:

Name Definition
current The value for the current minute. This is used only when the time rollup type used by the Controller is current.
count The number of times the agent collected the metric over the selected time period.
min, max The minimum and maximum values reported across the selected time period. These are not used for all metric types.
occurrences The number of data samples taken by the Controller to calculate the standard deviation.
standardDeviation The intermediate values calculated by the Controller during time rollup used to calculate standard deviation. See Dynamic Baselines.
startTimeInMillis The startTimeInMillis is the start time of the time range to which the result metric data applies in UNIX epoch time.
sum The total accumulated value for the metric over the selected time period.
useRange Used internally by the Controller to process the metric.
value The 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
    Request
    CODE
    <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>
    
    CODE
    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
    CODE
    /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>
    
    CODE
    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
    CODE
    /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>
    
    
    CODE
    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
    CODE
    /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>
    
    CODE
    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>
CODE
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>
CODE
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

[Query(クエリ)]

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

いいえ

archived

[Query(クエリ)]

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

いいえ

deep-dive-policy

[Query(クエリ)]

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

  • 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

[Query(クエリ)]

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

いいえ

application-component-node-ids

クエリ

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

いいえ

business-transaction-ids

[Query(クエリ)]

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

いいえ

user-experience

[Query(クエリ)]

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

  • NORMAL
  • SLOW
  • VERY_SLOW
  • STALL
  • ERROR

いいえ

first-in-chain

[Query(クエリ)]

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

いいえ

need-props

[Query(クエリ)]

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

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

いいえ

need-exit-calls

[Query(クエリ)]

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

いいえ

execution-time-in-milis

[Query(クエリ)]

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

いいえ

session-id

[Query(クエリ)]

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

いいえ

user-principal-id

[Query(クエリ)]

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

いいえ

error-ids

[Query(クエリ)]

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

いいえ

starting-request-id、ending-request-id

[Query(クエリ)]

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

いいえ

error-occurred

[Query(クエリ)]

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

いいえ

diagnostic-snapshot

[Query(クエリ)]

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

いいえ

bad-request

[Query(クエリ)]

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

いいえ

diagnostic-session-guid

[Query(クエリ)]

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

いいえ

data-collector-name

[Query(クエリ)]

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

いいえ

data-collector-value

[Query(クエリ)]

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

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

data-collector-type

[Query(クエリ)]

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 [Query(クエリ)] 指定されている場合、この数値が返される最大結果数となります。指定されていない場合は、最大でデフォルト値である 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>

コントローラの監査履歴を取得する

コントローラの監査履歴は、コントローラの構成の設定とユーザアクティビティのレコードです。ControllerAuditHistory API メソッドは、指定した時間範囲の監査ログを返します。出力形式は、JSON または CSV です。この情報は、audit.log ファイルに記載されている内容と同じです。

プラットフォーム ログファイル」および「プラットフォーム別のログファイル情報」を参照してください。

形式

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

入力パラメータ

パラメータ名 Parameter Type 必須

start-time

クエリ

yyyy-MM-dd'T'HH:mm:ss.SSSZ 形式の開始時刻

あり

end-time

クエリ

yyyy-MM-dd'T'HH:mm:ss.SSSZ 形式の終了時刻

あり

time-zone-id [Query(クエリ)] Time zone いいえ
include [Query(クエリ)] コントローラの監査履歴の制限付き情報 いいえ
exclude [Query(クエリ)] コントローラの監査履歴の制限付き情報 いいえ
  • 出力のサイズを制御するには、start-time から end-time までの範囲が 24 時間を超えないようにします。24 時間よりも長くなる場合は、連続する時間パラメータで複数のクエリを使用します。
  • 同じタイプの複数のフィルタが許可されます。
    • バックエンド API は、含まれるフィルタを、リレーションシップ OR と同じ <field> で処理します。
    • リレーションシップ AND とは異なる < field > でフィルタ処理します。include フィルタと exclude フィルタが直接連携することはありません。
  • 各フィルタは、 include=filterName1:filterValue1&include=filterName2:filterValue2 などのパラメータにする必要があります。以下の例を参照してください。
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

アカウントごとにメトリックの保持期間を設定する

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

  • 古いメトリックとは、設定された日数を基に新しいデータが報告されなかったメトリックを指します。
  • これにより、3 日を経過した EUM および SIM メトリックのみが削除されます。
重要: このオプションを設定するには、コントローラの所有者である必要があります。SaaS のお客様はこの API を使用できません。

形式

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

入力パラメータ

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

警告: root@system は SaaS オペレーションズチームが所有しているため、SaaS のお客様はこの API を使用できません。
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"