構成 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 四半期 |
|
あり |
例
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 |
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>
コントローラの設定を名前ごとに取得する
この API を使用して、特定のコントローラ構成設定の値を取得します。
形式
GET /configuration?name=controller_setting_name
入力パラメータ
| パラメータ名 | Parameter Type | 値 | 必須 |
|---|---|---|---|
|
name |
クエリ |
取得するコントローラ設定の名前 |
あり |
|
出力 |
クエリ |
出力形式を変更するために URL の一部として含まれている HTTP リクエストパラメータ。有効な値は |
いいえ |
例
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 を使用して、コントローラ設定を指定した値に設定します。
形式
POST /controller/rest/configuration
入力パラメータ
| パラメータ名 | Parameter Type | 値 | 必須 |
|---|---|---|---|
|
name |
クエリ |
取得するコントローラ設定の名前。 |
あり |
|
value |
クエリ |
設定する値。 |
あり |