0

当我使用如下 URL 从浏览器调用 REST URI 时

http://:/controller/rest/applications//business-transactions?output=JSON

这将输出提供为

[
    {
    "id": 443,
    "internalName": "/AjaxCapabilities/ResultProvider.aspx",
    "name": "/AjaxCapabilities/ResultProvider.aspx",
    "entryPointType": "ASP_DOTNET",
    "background": false,
    "tierName": "Microsoft Dynamics CRM/AjaxCapabilities",
    "tierId": 24
  },
    {
    "id": 444,
    "internalName": "/AppWebServices/AppGridWebService.ashx",
    "name": "/AppWebServices/AppGridWebService.ashx",
    "entryPointType": "ASP_DOTNET",
    "background": false,
    "tierName": "Microsoft Dynamics CRM",
    "tierId": 25
  },
    {
    "id": 445,
    "internalName": "/{636312148120003543}/WebResources",
    "name": "/{636312148120003543}/WebResources",
    "entryPointType": "ASP_DOTNET",
    "background": false,
    "tierName": "Microsoft Dynamics CRM",
    "tierId": 25
  },...]

此输出缺少严重性信息的指示器/字段,如 WARNING、CRITICAL、NORMAL 等。如何从 AppDynamics REST 调用中获取严重性信息?

4

2 回答 2

1

严重性与 AppDynamics 中的特定事件/实体相关联。根据您的 API 调用,我可以看到您正在尝试检索有关业务交易 (BT) 的信息。严重性参数与 BT 无关。

例如,您可以通过以下 API 调用在 AppDynamics 中拉取健康规则违规的严重性:http:///controller/rest/applications//problems/healthrule-violations 结果:

<policy-violations><policy-violation>
  <id>266</id>
  <name>CPU utilization is too high</name>
  <startTimeInMillis>1452630655000</startTimeInMillis>
  <detectedTimeInMillis>0</detectedTimeInMillis>
  <endTimeInMillis>1452630715000</endTimeInMillis>
  <incidentStatus>RESOLVED</incidentStatus>
  **<severity>WARNING</severity>**
  <triggeredEntityDefinition>
    <entityType>POLICY</entityType>
    <entityId>30</entityId>
    <name>CPU utilization is too high</name>
  </triggeredEntityDefinition>
....

您可以在以下文档页面中找到有关使用 AppD 控制器 API 的更多信息:

https://docs.appdynamics.com/display/PRO42/AppDynamics+APIs

https://docs.appdynamics.com/display/PRO42/Alert+and+Respond+API

于 2017-07-22T10:24:47.610 回答
0

您可以通过将 &severities=INFO,WARN,ERROR 附加到您的 URL 来获取严重性信息。

所以你的网址必须是这样的:http://:/controller/rest/applications//business-transactions?output=JSON&severities=INFO,WARN,ERROR

于 2017-06-28T14:23:30.087 回答