业务组列表 API


此API将获取在服务器中创建的所有业务组列表,其中包括业务组配置的所有子组和关联的监视器。这还将列出与用户关联的业务组。这将包含有关业务组今天的可用性,监视器在子组和相关监视器之间的健康状况的信息。

XML响应API:

http://[ APM Host ]:[ APM Port ]/AppManager/xml/ListMonitorGroups?apikey=[ API Key ]&type=all

JSON响应的API:

http://[ APM Host ]:[ APM Port ]/AppManager/json/ListMonitorGroups?apikey=[ API Key ]&groupId=10000035

请求参数:

字段 描述
groupId 此参数用于根据用户的业务组标识获取业务组及其关联的监视器
groupName 此参数用于根据用户的业务组名称获取业务组及其关联的监视器。
outageReports 此参数用于确定用户是否需要停机报表。此参数的值为true或false。默认值是true。如果值为true,则在响应中添加以下详细信息:
  • TODAYAVAILPERCENT
  • TODAYSCHEDDOWNPERCENT
  • TODAYUNMANGDPERCENT
  • TODAYUNAVAILPERCENT
  • OUTAGES
  • AvailabilityUnknownCount
  • UPCOUNT
  • DOWNCOUNT
  • HealthUnknownCount
  • CLEARCOUNT
  • WARNINGCOUNT
  • CRITICALCOUNT
severityDetails 此参数用于定义用户是否需要严重级别详细信息。此参数的值为true或false。默认值是true。如果值为true,则在响应中添加以下详细信息:
  • HEALTHSEVERITY
  • HEALTHSTATUS
  • HEALTHMESSAGE
  • HealthRCAURL
  • AVAILABILITYSEVERITY
  • AVAILABILITYSTATUS
  • AVAILABILITYMESSAGE
  • AvailabilityRCAURL
treeview 此参数用于显示给定业务组的树视图结构。值是
  • toplevel-显示给定组的所有父业务组。
  • bottomlevel-显示给定组的所有子业务组。
  • all-显示给定组的所有父级和子级业务组。
如果以上参数均未传递,则默认情况下将显示第一级子组。
listOnlyParentGroups 如果将此参数设置为true,则仅列出父级业务组。

注意:如果未在输入中指定groupNamegroupId,则所有业务组详细信息将在响应中显示。

响应详情:

字段 描述
DetailsPageURL 这是业务组的详细信息页面的URL
TODAYUNAVAILPERCENT 此值代表今天的不可用百分比
AvailabilityRCAURL 表示可用性RCA Url。
Action 表示业务组的状态,无论是否执行操作
CRITICALCOUNT 代表重要的/业务组的数量
NAME\DISPLAYNAME 代表业务组的显示名称
DOWNCOUNT 代表该组中停机的监视器/业务组的总数
TODAYAVAILPERCENT 此值代表今天的可用性百分比
TODAYSCHEDDOWNPERCENT 此值代表今天的计划停机时间百分比
Type 该值表示类型,即业务组或子组
HEALTHSEVERITY 这代表此业务组的健康状况严重程度(1严重,4警告和5正常)
HealthUnknownCount 表示健康状况未知的监视器或子组的数量。
AVAILABILITYSEVERITY 表示此业务组的可用性的严重级别(1-down,5-up)
AVAILABILITYMESSAGE 该组的可用性消息
RESOURCEID 业务组的resourceid。
CLEARCOUNT 表示健康状况正常的监视器或子组的数量。
UPCOUNT 表示可用性已提高的监视器或子组的数量。
HealthRCAURL 表示显示该组的健康状况RCA的链接。
TODAYUNMANGDPERCENT 此值代表今天取消管理的百分比
HEALTHMESSAGE 这是该组的健康信息
AvailabilityUnknownCount 表示可用性未知的监视器或子组的数量。
OUTAGES 示健康状况不明确的监视器或子组的数量。
WARNINGCOUNT 表示健康状况警告的监视器或子组的数量。
HEALTHSTATUS 代表该组的健康状况(严重/正常/警告)
AVAILABILITYSTATUS 表示该组的可用性状态(正常/停机)
SubMonitorGroup
  • DetailsPageURL --- 子组的详细信息页面
  • TODAYUNAVAILPERCENT --- 这是子分组的今天不可用百分比group
  • AvailabilityRCAURL --- 表示子组的可用性RCA URL
  • Action ---指出是否为此子组启用了动作。
  • NAME\DISPALYNAME ---这是子组的显示名
  • TODAYAVAILPERCENT ---这是子组的今天可用性百分比
  • TODAYSCHEDDOWNPERCENT --- 这是子组今天的计划内停机时间百分比
  • HEALTHSEVERITY --- 这是子组的严重程度
  • TYPE ----代表它是否属于子组/组
  • AVAILABILITYSEVERITY --- 这是子组的可用性严重程度
  • AVAILABILITYMESSAGE --- 这是子组的可用性消息
  • RESOURCEID ----这是resourceid的子组
  • HealthRCAURL ---这是此子组的RCA健康状况URL
  • TODAYUNMANGDPERCENT ---这是今天该子组中取消管理的百分比
  • HEALTHMESSAGE ---这是子组的健康信息
  • HEALTHSTATUS --- 这是子组的健康状况
  • AVAILABILITYSTATUS --- 这是子组的可用性状态

情况0:类型为全部时

<AppManager-response uri="/AppManager/xml/ListMonitorGroups">
<result>
<response response-code="4000">
<MonitorGroups>
<MonitorGroup DetailsPageURL="/showresource.do?method=showResourceForResourceID&resourceid=10000036&method=showApplication"
TODAYUNAVAILPERCENT="0.0" AvailabilityRCAURL="/jsp/RCA.jsp?resourceid=10000036&attributeid=17" Action="enabled" CRITICALCOUNT="0" NAME="Applications Manager"
DOWNCOUNT="0" TODAYAVAILPERCENT="100.0" TODAYSCHEDDOWNPERCENT="0.0" Type="Monitor Group" HEALTHSEVERITY="5" HealthUnknownCount="0"
AVAILABILITYSEVERITY="5" AVAILABILITYMESSAGE="Resource Applications Manager is up. <br>Root Cause : <br>Resource is Up" RESOURCEID="10000036" CLEARCOUNT="5" UPCOUNT="5"
HealthRCAURL="/jsp/RCA.jsp?resourceid=10000036&attributeid=18" TODAYUNMANGDPERCENT="0.0" HEALTHMESSAGE="Health of Applications Manager is clear. <br>Root Cause : <br>Health is Clear"
AvailabilityUnknownCount="0" OUTAGES="0/5" DISPLAYNAME="Applications Manager_karthi-0031" WARNINGCOUNT="0" HEALTHSTATUS="clear" AVAILABILITYSTATUS="up" />
</MonitorGroups>
</response>
</result>
</AppManager-response>

情况1:当中断报表为false时

<AppManager-response uri="/AppManager/xml/ListMonitorGroups"><result><response response-code="4000"><MonitorGroups><MonitorGroup HEALTHMESSAGE="Health of Applications Manager is critical. <br>Root Cause : <br><ol><li>Health of host-0589_Windows 7 is critical. <br>Root Cause : <br>1. aaa is down <br>2. 111 is down <br></li></ol>" Type="Monitor Group" DISPLAYNAME="Applications Manager" AVAILABILITYMESSAGE="Resource Applications Manager is up. <br>Root Cause : <br>Resource is Up" AVAILABILITYSEVERITY="5" Action="enabled" HEALTHSTATUS="critical" describe="The resources used by Applications Manager" HealthRCAURL="/jsp/RCA.jsp?resourceid=10000029&attributeid=18" RESOURCEID="10000029" AVAILABILITYSTATUS="up" AvailabilityRCAURL="/jsp/RCA.jsp?resourceid=10000029&attributeid=17" DetailsPageURL="/showresource.do?method=showResourceForResourceID&resourceid=10000029&method=showApplication" NAME="Applications Manager" HEALTHSEVERITY="1"/></MonitorGroups></response></result></AppManager-response>

情况 2: 当危急详情是false

<AppManager-response uri="/AppManager/xml/ListMonitorGroups"><result><response response-code="4000"><MonitorGroups><MonitorGroup DetailsPageURL="/showresource.do?method=showResourceForResourceID&resourceid=10000029&method=showApplication" TODAYUNAVAILPERCENT="0.0" Action="enabled" CRITICALCOUNT="1" NAME="Applications Manager" TODAYAVAILPERCENT="100.0" DOWNCOUNT="0" TODAYSCHEDDOWNPERCENT="0.0" Type="Monitor Group" HealthUnknownCount="0" describe="The resources used by Applications Manager" RESOURCEID="10000029" UPCOUNT="4" CLEARCOUNT="3" TODAYUNMANGDPERCENT="0.0" AvailabilityUnknownCount="0" OUTAGES="1/4" DISPLAYNAME="Applications Manager" WARNINGCOUNT="0"/></MonitorGroups></response></result></AppManager-response>

情况 3: 当中断报表危急详情都是false

<AppManager-response uri="/AppManager/xml/ListMonitorGroups"><result><response response-code="4000"><MonitorGroups><MonitorGroup RESOURCEID="10000029" DISPLAYNAME="Applications Manager" describe="The resources used by Applications Manager" Type="Monitor Group" DetailsPageURL="/showresource.do?method=showResourceForResourceID&resourceid=10000029&method=showApplication" Action="enabled" NAME="Applications Manager"/><MonitorGroup RESOURCEID="10000103" DISPLAYNAME="ParentGrp1" describe="describe....This service is critical to our business" Type="Monitor Group" DetailsPageURL="/showresource.do?method=showResourceForResourceID&resourceid=10000103&method=showApplication" Action="enabled" NAME="ParentGrp1"><SubMonitorGroup RESOURCEID="10000104" DISPLAYNAME="SubGrp1" DetailsPageURL="/showresource.do?method=showResourceForResourceID&resourceid=10000104&method=showApplication" Action="enabled" NAME="SubGrp1" IMAGEPATH="/images/icon_monitors_app.gif" TYPE="Sub Group"></SubMonitorGroup></MonitorGroups></response></result></AppManager-response>   

JSON 输入:

http://apm-prod1:9090/AppManager/json/ListMonitorGroups?apikey=c4e547c2330e2eb92d3e7af2262da9e9&groupId=10000035

JSON 响应:

{"response-code":"4000","response":{"uri":"/AppManager/json/ListMonitorGroups","result":[{"DetailsPageURL":"/showresource.do?method=showResourceForResourceID&resourceid=20000036&method=showApplication","TODAYUNAVAILPERCENT":"100.0","AvailabilityRCAURL":"/jsp/RCA.jsp?resourceid=20000036&attributeid=17","Action":"enabled","CRITICALCOUNT":"1","NAME":"Applications Manager","DOWNCOUNT":"1","TODAYAVAILPERCENT":"0.0","TODAYSCHEDDOWNPERCENT":"0.0","Type":"Monitor Group","HEALTHSEVERITY":"1","HealthUnknownCount":"0","AVAILABILITYSEVERITY":"1","AVAILABILITYMESSAGE":"Resource Applications Manager is down. <br>Root Cause : <br><ol><li>Resource down. <br>The resource AppManager Home Page is not available.Connection Timed Out. Increase the time out level:ResponseCode -200<br>-->><\/li><\/ol>","RESOURCEID":"20000036","CLEARCOUNT":"2","UPCOUNT":"2","HealthRCAURL":"/jsp/RCA.jsp?resourceid=20000036&attributeid=18","TODAYUNMANGDPERCENT":"0.0","HEALTHMESSAGE":"Health of Applications Manager is Critical. <br>Root Cause : <br><ol><li>Health of AppManager Home Page is critical. <br>Root Cause : <br>1. AppManager Home Page is down<br><\/li><\/ol>","AvailabilityUnknownCount":"0","OUTAGES":"1/3","DISPLAYNAME":"Applications Manager","WARNINGCOUNT":"0","HEALTHSTATUS":"critical","AVAILABILITYSTATUS":"down"}]}}