使用下面给出的API,您可以从Applications Manager获取已配置的业务应用程序和服务器的SLA报表的原始数据。
该API允许用户在Applications Manager中获取SLA报表的原始数据。
使用时间段参数:
http://[ APM Host ]:[ APM Port ]/AppManager/xml/slaReport?apikey=[API Key]&period=[period]&showOnlySlaAppliedBAs=[true/false]
使用自定义时间:
http://[ APM Host ]:[ APM Port ]/AppManager/xml/slaReport?apikey=[API Key]&showOnlySlaAppliedBAs=[true/false]&startTime=[Start Time]&endTime=[End Time]
| 字段 | 描述 |
|---|---|
| apikey | 使用 管理标签中的生成API密钥选项生成的密钥。 |
| period | 已请求SLA报表的期限。可能的值为:
|
| showOnlySlaAppliedBAs | 在响应中仅过滤出SLA应用的BA。 (TrueorFalse) |
| startTime | 自定义开始时间(以毫秒为单位)。 |
| endTime | 自定义结束时间(以毫秒为单位)。 |
使用时间段参数:
http://apm-prod1:9090/AppManager/xml/slaReport?apikey=c4e547c2330e2eb92d3e7af2362da9e9&period=0&showOnlySlaAppliedBAs=true
使用自定义时间:
http://apm-prod1:9090/AppManager/xml/slaReport?apikey=c4e547c2330e2eb92d3e7af2362da9e9&showOnlySlaAppliedBAs=true&startTime=1582191000000&endTime=1582194600000
<AppManager-response uri="/AppManager/xml/slaReport"><result><response response-code="4000"><SLA Availability="NA" AvailabilitySlaCondition="greater than" AvailabilitySlaStatus="NA" AvailabilitySlaValue="99.9" ClearEventCount="0" CriticalEventCount="0" EventSlaCondition="less than" EventSlaDuration="month" EventSlaStatus="PASS" EventSlaValue="10.0" MailOptedForSlaEscalation="false" MeanTimeBetweenFailures="0 Secs" MeanTimeToRepair="0 Secs" Name="Applications Manager" ResourceId="10000031" SlaId="1" SlaName="Gold" TotalDowntime="0 Secs" UnderScheduledMaintenancePercentage="0.0" UnmanagedPercentage="0.0" WarningEventCount="0"/><SLA Availability="NA" AvailabilitySlaCondition="greater than" AvailabilitySlaStatus="NA" AvailabilitySlaValue="25.0" ClearEventCount="0" CriticalEventCount="0" EventSlaCondition="less than" EventSlaDuration="month" EventSlaStatus="PASS" EventSlaValue="3.0" MailOptedForSlaEscalation="true" MeanTimeBetweenFailures="0 Secs" MeanTimeToRepair="0 Secs" Name="azuremes" ResourceId="10001080" SlaId="5" SlaName="MailInforSLA " TotalDowntime="0 Secs" UnderScheduledMaintenancePercentage="0.0" UnmanagedPercentage="0.0" WarningEventCount="0"/><SLA Availability="NA" AvailabilitySlaCondition="greater than" AvailabilitySlaStatus="NA" AvailabilitySlaValue="10.0" ClearEventCount="0" CriticalEventCount="0" EventSlaCondition="less than" EventSlaDuration="month" EventSlaStatus="PASS" EventSlaValue="9.0" MailOptedForSlaEscalation="false" MeanTimeBetweenFailures="0 Secs" MeanTimeToRepair="0 Secs" Name="DownGroup-Anandhi" ResourceId="10000958" SlaId="3" SlaName="BASLA " TotalDowntime="0 Secs" UnderScheduledMaintenancePercentage="0.0" UnmanagedPercentage="0.0" WarningEventCount="0"/></response></result></AppManager-response>
该API允许用户在Applications Manager中获取Server SLA报表的原始数据。
使用时间段参数:
http://[ APM Host ]:[ APM Port ]/AppManager/json/serverSlaReport?apikey=[API Key]&period=[period]&showOnlySlaAppliedServers=[true/false]
使用自定义时间
http://[ APM Host ]:[ APM Port ]/AppManager/json/serverSlaReport?apikey=[API Key]&showOnlySlaAppliedServers=[true/false]&startTime=[Start Time]&endTime=[End Time]
| 字段 | 描述 |
|---|---|
| apikey | 使用 管理标签中的生成API密钥选项生成的密钥。 |
| period | 已请求服务器SLA报表的时间段。可能的值为:
|
| showOnlySlaAppliedServers | 在响应中仅过滤出SLA Applied服务器。 (TrueorFalse) |
| startTime | 自定义开始时间(以毫秒为单位)。 |
| endTime | 自定义结束时间(以毫秒为单位)。 |
使用时间段参数:
http://apm-prod1:9090/AppManager/json/serverSlaReport?apikey=c4e547c2330e2eb92d3e7af2362da9e9&period=0&showOnlySlaAppliedServers=true
使用自定义时间
http://apm-prod1:9090/AppManager/json/serverSlaReport?apikey=c4e547c2330e2eb92d3e7af2362da9e9&showOnlySlaAppliedServers=true&startTime=1582191000000&endTime=1582194600000
{"response-code": "4000","response": {"result": [{"MeanTimeToRepair": "0 Secs","EventSlaStatus": "PASS","EventSlaCondition": "less than","Name": "Windows 10_AdminServer","ClearEventCount": "0","UnmanagedPercentage": "0","WarningEventCount": "0","MailOptedForSlaEscalation": "false","EventSlaDuration": "month","AvailabilitySlaCondition": "greater than","Availability": "100","MeanTimeBetweenFailures": "18 Hrs 14 Mins 51 Secs","UnderScheduledMaintenancePercentage": "0","SlaId": "2","AvailabilitySlaValue": "99.9","TotalDowntime": "0 Secs","AvailabilitySlaStatus": "PASS","CriticalEventCount": "0","ResourceId": "10017","EventSlaValue": "10","SlaName": "Silver"}],"uri": "/AppManager/json/serverSlaReport"}}
该API允许用户在Applications Manager中列出SLA配置详细信息。
没有SLA ID:
http://[ APM Host ]:[ APM Port ]/AppManager/xml/slaDetails?apikey=[API Key]
使用 SLA ID:
http://[ APM Host ]:[ APM Port ]/AppManager/json/slaDetails?apikey=[API Key]&slaId=[SLA IDs]
| 字段 | 描述 |
|---|---|
| apikey | 使用管理标签中的生成API密钥选项生成的密钥。 |
| slaId | 表示SLA标识符。可以指定多个SLA ID(用逗号分隔)。 |
没有 SLA ID:
http://apm-prod1:9090/AppManager/xml/slaDetails?apikey=c4e547c2330e2eb92d3e7af2362da9e9
使用 SLA ID:
http://apm-prod1:9090/AppManager/json/slaDetails?apikey=c4e547c2330e2eb92d3e7af2362da9e9&slaId=1,2
没有 SLA ID:
<AppManager-response uri="/AppManager/xml/slaDetails"><result><response response-code="4000"><SLA AvailabilityCondition="greater than" AvailabilityThreshold="97.0" BusinessHourId="-1" describe="This is For Server" EventCondition="less than" EventThreshold="10" Id="2" MailOptedForEscalation="true" Name="Silver " Type="Server"><AssociatedResources DisplayName="apm-prod1_Windows 10" ResourceId="10000019"/><MailDetails FromAddress="gokul.v@zohocorp.com" Message="This information has been generated due to an SLA violation" Subject="Alarm due to SLA violation" ToAddress="gokul.v@zohocorp.com,gokulvgkl@gmail.com"/></SLA><SLA AvailabilityCondition="greater than" AvailabilityThreshold="99.9" BusinessHourId="-1" describe="This is For Business Application" EventCondition="less than" EventThreshold="10" Id="1" MailOptedForEscalation="true" Name="Gold " Type="Business Application"><AssociatedResources DisplayName="Applications Manager" ResourceId="10000013"/><AssociatedResources DisplayName="test-1" ResourceId="10000206"/><MailDetails FromAddress="gokul.v@zohocorp.com" Message="This information has been generated due to an SLA violation" Subject="Alarm due to SLA violation" ToAddress="test"/></SLA><SLA AvailabilityCondition="greater than" AvailabilityThreshold="99.9" BusinessHourId="-1" describe="" EventCondition="not set" EventThreshold="not set" Id="3" MailOptedForEscalation="false" Name="Platinum " Type="Business Application"/></response></result></AppManager-response>
使用SLA ID:
{"response-code": "4000","response": {"result": [{"Describe": "This is For Server","Type": "Server","AssociatedResources": [{ "DisplayName": "Windows 10","ResourceId": "10000019"}],"Id": "2","BusinessHourId": "-1","MailOptedForEscalation": "true","AvailabilityThreshold": "97.0","Name": "Silver ","MailDetails": [{ "Subject": "Alarm due to SLA violation","Message": "This information has been generated due to an SLA violation","ToAddress": "info@test.com","FromAddress": "info1@test.com"} ], "AvailabilityCondition": "greater than","EventCondition": "less than","EventThreshold": "10"},{"Describe": "This is For Business Application","Type": "Business Application","AssociatedResources": [{"DisplayName": "Applications Manager","ResourceId": "10000013"},{"DisplayName": "test-1","ResourceId": "10000206"}],"Id": "1","BusinessHourId": "-1","MailOptedForEscalation": "true","AvailabilityThreshold": "99.9","Name": "Gold ","MailDetails": [{"Subject": "Alarm due to SLA violation","Message": "This information has been generated due to an SLA violation","ToAddress": "test1@test.com","FromAddress": "test@test.com"}],"AvailabilityCondition": "greater than","EventCondition": "less than","EventThreshold": "10"}],"uri": "/AppManager/json/slaDetails"}}
它允许我们跟踪关键指标,如响应时间、资源利用率、错误率和交易性能。实时监控告警会及时通知我们任何问题或异常,使我们能够立即采取行动。
审稿人角色:研究与开发

Lexmark技术支持经理