構成 API

このページでは、選択したコントローラ構成の設定をプログラムによって読み取りおよび変更することができる構成 API メソッドについて説明します。構成 API を使用して、頻繁に実行する必要があるタスクや、ユーザーの追加などの大規模なバッチをスクリプト化または自動化できます。

注: コントローラのコンフィギュレーション定義ファイルを編集してインポートすることができるため、構成インポートおよびエクスポート API では、API を使用して設定の変更を選択する機能も用意されています。

Include or Exclude a Business Transaction from Monitoring

You can exclude or include business transactions for monitoring by passing the exclude parameter to the business-transactions retrieval API described in the Application Model API.

To exclude a business transaction, pass the XML-represented ID of the business transaction to be excluded with the exclude parameter set to true. To turn on monitoring for a currently excluded business transaction, set the exclude parameter to false.

Send the list of business transactions to be excluded or re-included as the XML-formatted POST payload. A sample business-transaction list is:

<business-transactions>
<business-transaction>
<id>15</id>
</business-transaction>
<business-transaction>
<id>16</id>
</business-transaction>
</business-transactions>
警告: Ensure that the Content-Type header is set to application/xml.

Format

POST /controller/rest/applications/application_id/business-transactions

Input Parameters

Parameter Name Parameter Type Value Mandatory

application_id

URI

Provide either the application name or application id.

Yes

exclude

Post

true|false

Yes

Example

curl -X POST -H "Content-Type:text/xml" --user user1@customer1:your_password http://demo.appdynamics.com/controller/rest/applications/6/business-transactions\?exclude=true -d @businesstransaction.xml

Retrieve All Controller Settings

The Controller global configuration values are made up of the Controller settings that are presented in the Administration Console.

Format

GET /controller/rest/configuration

Input Parameters

Parameter Name Parameter Type Value Mandatory

output

Query

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

No

Example

curl --user admin@customer1:your_password http://demo.appdynamics.com/controller/rest/configuration
<configuration-items><configuration-item>
<name>eventsvc.request.segment.data.max.retrieval.size</name>
<value>5000</value>
<description>Max number of request segment data that can be retrieved from event service in a query</description>
<updateable>true</updateable>
<scope>cluster</scope>
</configuration-item>
<configuration-item>
<name>machine.agent.max.new.actions.per.min</name>
<value>15</value>
<description>Maximum number of new actions dispatched per minute for each machine agent</description>
<updateable>true</updateable>
<scope>cluster</scope>
</configuration-item>
...
<configuration-item>
<name>tss.retention.period</name>
<value>336</value>
<description>Time (in hours) to retain 12 hour tss data values before they are purged from the system.</description>
<updateable>true</updateable>
<scope>cluster</scope>
</configuration-item>
<configuration-item>
<name>snapshots.retention.period</name>
<value>336</value>
<description>Time (in hours) to retain snapshots before they are purged from the system.</description>
<updateable>true</updateable>
<scope>cluster</scope>
</configuration-item>
<configuration-item>
<name>metrics.min.retention.period</name>
<value>4</value>
<description>Time (in hours) to retain minute metric data values before they are purged from the system.</description>
<updateable>true</updateable>
<scope>cluster</scope>
</configuration-item>
<configuration-item>
<name>system.notification.event.types</name>
<value>LICENSE,DISK_SPACE,CONTROLLER_AGENT_VERSION_INCOMPATIBILITY,CONTROLLER_EVENT_UPLOAD_LIMIT_REACHED,CONTROLLER_RSD_UPLOAD_LIMIT_REACHED,CONTROLLER_METRIC_REG_LIMIT_REACHED,CONTROLLER_METRIC_DATA_BUFFER_OVERFLOW,CONTROLLER_ERROR_ADD_REG_LIMIT_REACHED,CONTROLLER_ASYNC_ADD_REG_LIMIT_REACHED,AGENT_ADD_BLACKLIST_REG_LIMIT_REACHED,AGENT_METRIC_BLACKLIST_REG_LIMIT_REACHED,CONTROLLER_STACKTRACE_ADD_REG_LIMIT_REACHED,CONTROLLER_SEP_ADD_REG_LIMIT_REACHED,CONTROLLER_MEMORY_ADD_REG_LIMIT_REACHED,CONTROLLER_TRACKED_OBJECT_ADD_REG_LIMIT_REACHED,CONTROLLER_COLLECTIONS_ADD_REG_LIMIT_REACHED</value>
<description>Comma separated list of Event Types (with no spaces between each) that will shown as System Notifications in the UI.</description>
<updateable>true</updateable>
<scope>cluster</scope>
</configuration-item>
</configuration-items>

Retrieve a Controller Setting by Name

Use this API to get the value of a given Controller configuration setting.

Format

GET /configuration?name=controller_setting_name

Input Parameters

Parameter Name Parameter Type Value Mandatory

name

Query

Name of the Controller setting to retrieve

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

Example

curl --user admin@customer1:your_password http://demo.appdynamics.com/controller/rest/configuration?name=metrics\.min\.retention\.period
<configuration-items><configuration-item>
<name>metrics.min.retention.period</name>
<value>4</value>
<description>Time (in hours) to retain minute metric data values before they are purged from the system.</description>
<updateable>true</updateable>
<scope>cluster</scope>
</configuration-item>
</configuration-items>

Configure Global Controller Settings

Use this API to set a Controller setting to a specified value.

警告: You cannot use this REST API to modify Controller settings on SaaS.

Format

POST /controller/rest/configuration

Input Parameters

Parameter Name Parameter Type Value Mandatory

name

Query

Name of the Controller setting to get.

Yes

value

Query

Value to set.

Yes

ノードを履歴としてマークする

この API を使用して、ノードを履歴としてマークし、ノードの特定のタイプの処理アクティビティ(ルール評価)を一時停止します。デフォルトでは、node.retention.period コントローラ設定で設定した時間切断されていたコントローラを持つノードが、AppDynamics で履歴としてマーク(削除済みアイテムフォルダへ移動)されます。デフォルトは 500 時間です。

履歴としてマークされるノードの識別子を 1 つ以上(最大 25 ノード)渡します。ID が複数ある場合はカンマで区切って指定する必要があります。

形式

POST /controller/rest/mark-nodes-historical?application-component-node-ids=value

入力パラメータ

パラメータ名 パラメータタイプ 必須

application-component-node-ids

クエリ

ノード ID のカンマ区切りリスト

あり

curl -X POST --user admin@customer1:your_password http://demo.appdynamics.com/controller/rest/mark-nodes-historical?application-component-node-ids=44,45
<application-component-node-id>
<Node Id : 44 marked as historical./>
<Node Id : 45 is not present or already marked as historical/>
</application-component-node-id>