構成 API

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

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

ビジネストランザクションをモニタリング対象に含めるか除外する

アプリケーションモデル API」で説明されているビジネストランザクション取得 API に対して exclude パラメータを渡してモニタリングするビジネストランザクションを除外するか、含めることができます。

ビジネストランザクションを除外するには、exclude パラメータを true に設定して、除外されるビジネストランザクションの XML で表された ID を渡します。現在除外されているビジネストランザクションのモニタリングをオンにするには、exclude パラメータを false に設定します。

除外する、または再度含めるようにするビジネストランザクションのリストを、XML 形式の POST ペイロードとして送信します。ビジネス トランザクション リストのサンプルは次のとおりです。

<business-transactions>
<business-transaction>
<id>15</id>
</business-transaction>
<business-transaction>
<id>16</id>
</business-transaction>
</business-transactions>
警告: Content-Type ヘッダーが application/xml に設定されていることを確認します。

形式

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

入力パラメータ

パラメータ名 Parameter Type 必須

application_id

URI

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

あり

exclude

2 四半期

true|false

あり

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

注: The response will include both account-level and Controller-level properties. If a property is defined at both levels, the value of the account-level property takes precedence over the value specified for the Controller-level property.

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>

コントローラの設定を名前ごとに取得する

この API を使用して、特定のコントローラ構成設定の値を取得します。

形式

GET /configuration?name=controller_setting_name

入力パラメータ

パラメータ名 Parameter Type 必須

name

クエリ

取得するコントローラ設定の名前

あり

出力

クエリ

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

いいえ

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>

グローバルコントローラを設定する

この API を使用して、コントローラ設定を指定した値に設定します。

警告: この REST API を使用して SaaS のコントローラ構成を変更することはできません。

形式

POST /controller/rest/configuration

入力パラメータ

パラメータ名 Parameter Type 必須

name

クエリ

取得するコントローラ設定の名前。

あり

value

クエリ

設定する値。

あり

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

この 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>