Custom Tag APIs

You can import custom tags in the Controller. You can then use the tags to filter and view entities to perform various tasks such as, configure a health rule or create a custom dashboard. The sources for custom tags can be API or CMDB.

For more information about tags, see Tags.

The below entries are currently supported for custom tagging :

EntityType
ApplicationAPPLICATION

Tier

APPLICATION_COMPONENT

Node

APPLICATION_COMPONENT_NODE
ServerSIM_MACHINE
Synthetic pageBASE_PAGE
Business TransactionBUSINESS_TRANSACTION
DashboardDASHBOARD

カスタムタグ付けの有効化

この機能を使用するには、管理コンソールで entity.tagging.enabled アカウントレベルプロパティを true に設定します。デフォルトでは、このプロパティは無効になっています。

注: 管理コンソールは Splunk AppDynamics によって管理されます。設定を更新するには、Splunk AppDynamics サポートにお問い合わせください。

Add Custom Tags

Custom tags are required to group entities of the same type. You can import the key-value pairs from the tag sources ( CMDB or API) to the Controller by using the tagEntitiesInBatch POST API.

Guidelines for Tags

Follow the guidelines before you import custom tags to the Controller:

  • The tag key names should not include whitespaces before or after the names. If there are whitespaces in the input, they are removed while creating a tag key.
  • The tag keys and values are case-sensitive. However, tag keys can differ in case when associated with separate entities.

    For example, consider the tags [OWNER: Joe] and [owner: John]. Although the key name "owner" is the same, the letter case differs.

    If these tags are associated with the same entity, the entity recognizes only the last tag applied, [owner: John], because the tag key name is the same regardless of case. Conversely, if the tags are associated with different entities, each entity recognizes its respective tag because the tag keys are unique to each entity.

  • The tag keys and values cannot be null, but can have a maximum length of 255 characters (including letters, numbers, punctuation, and symbols).Each tag key can have a single value.
  • The maximum limit for tags per entity is 50.The default limit for tags per entity is 25. To extend it till 50, the administrator can update the max.tags.per.entity property by using the Administration Console.
  • The maximum limit for tags per account is 100000.The default limit for tags per account is 50000. To extend it till 100000, the administrator can update the max.tags.per.account property in the Administration Console.

Format

POST controller/restui/tags/tagEntitiesInBatch

Input parameters

Parameter Name Parameter Type Value Mandatory

entityType

RequestPayload

The type of the entity. The values can be APPLICATION, APPLICATION_COMPONENT,APPLICATION_COMPONENT_NODE, SIM_MACHINE, BASE_PAGE, BUSINESS_TRANSACTION, DASHBOARD

Yes

sourceRequestPayload

The source for custom tags.The values can be CMDB, or API.

Yes
entitiesRequestPayload

Includes the entity details such as entityName, entityId, and the key-values for the custom tags.

Here, entityName is an optional parameter and entityId is a numeric Splunk AppDynamics ID of the entity.

Yes

Example Request

{
"entityType": "APPLICATION",
"source":"API",
"entities" :
[
{
"entityName": "sample App 1",
"entityId": 10,
"tags":
[
{
"key": "owner",
"value": "joe"
},
{
"key": "environment",
"value": "production"
}
]
},
{
"entityName": "sample App 2",
"entityId": 12,
"tags":
[
{
"key": "owner",
"value": "joe"
},
{
"key": "environment",
"value": "development"
},
{
"key": "criticality",
"value": "low"
}
]
}
]
}

Example Response

{
"entityType": "APPLICATION",
"success" : {
"count": 1,
"entityIds": [10]
},
"failure" : {
"count": 1,
"entityIds": [12]
}
}

The response shows how many entities were successfully tagged.

エンティティのすべてのカスタムタグの削除

特定のエンティティに関連付けられているすべてのタグを削除できます。

DELETE /controller/restui/tags/allTagsOnEntity?entityId={entityId}&entityType={entityType}

Input parameters

パラメータ名 Parameter Type 必須

entityId

URI

エンティティの Splunk AppDynamics ID(数値)。

あり

entityTypeURI

指定した entityId の、すべてのタグを削除するエンティティのタイプ。値には、APPLICATIONAPPLICATION_COMPONENT,APPLICATION_COMPONENT_NODE, SIM_MACHINE, BASE_PAGE, BUSINESS_TRANSACTION を使用できます

あり

この例では、ID が であるアプリケーションに関連付けられたすべてのタグを削除します。

https://<controller_host>:<controller_port>/controller/restui/tags/allTagsOnEntity?entityId=10&entityType=APPLICATION

エンティティのカスタムタグの削除

特定のエンティティに関連付けられている特定のタグを削除できます。

DELETE /controller/restui/tags/tagOnEntity?tagId={tagId}&entityId={entityId}&entityType={entityType}

Input parameters

パラメータ名 Parameter Type 必須

tagId

URI

タグの ID。

あり

entityId

URI

エンティティの Splunk AppDynamics ID(数値)。

あり

entityTypeURI

エンティティのタイプ。値には、APPLICATIONAPPLICATION_COMPONENT,APPLICATION_COMPONENT_NODE, SIM_MACHINE, BASE_PAGE, BUSINESS_TRANSACTION を使用できます

あり

Example

この例では、ID が 10 であるアプリケーションに関連付けられた ID が 5 であるタグを削除します

https://<controller_host>:<controller_port>/controller/restui/tags/tagOnEntity?tagId=5&entityId=10&entityType=APPLICATION

グループ内のエンティティのカスタムタグの削除

同じタイプのエンティティのすべてのタグを一括で削除できます。

POST /controller/restui/tags/removeAllTagsOnEntitiesInBatch

Input parameters

パラメータ名 Parameter Type 必須

entityType

RequestPayload

カスタムタグを削除する必要があるエンティティのタイプ。値には、APPLICATIONAPPLICATION_COMPONENT,APPLICATION_COMPONENT_NODE, SIM_MACHINE, BASE_PAGE, BUSINESS_TRANSACTION を使用できます

あり

entityIds RequestPayload

タグを削除する必要がある entityID の配列。

あり

要求の例

https://<controller_host>:<controller_port>/controller/restui/tags/removeAllTagsOnEntitiesInBatch
{
"entityType": "APPLICATION",
"entityIds" : [10, 11, 12]
}

応答の例

{
"entityType": "APPLICATION",
"success": {
"count": 2,
"entityIds": [10, 11]
},
"failure": {
"count": 1,
"entityIds": [12]
}
}