获取监视器数据 API


该API允许用户从监视器中获取最新轮询的数据。目前,我们支持获取监视器的第一级属性,即监视器重要属性的当前数据,例如响应时间,收集时间等。

示例请求

http://[Host]:[Port]/AppManager/xml/GetMonitorData?apikey=[APIKEY]&resourceid=[RESOURCEID]

请求参数

API请求中涉及的参数如下所述:

字段 描述        
API Key 通过管理标签中的生成API密钥选项生成的密钥
resourceid 需要为其获取数据的监视器的资源标识。该API支持多个resourceid作为GET参数。多个resourceid可以作为逗号分隔的值给出

示例

http://app-windows:9090/AppManager/xml/GetMonitorData?apikey=095cb3835ff015b01a3b3a6c4ab2c38a&resourceid=10000293

上面的示例获取Sybase监视器的当前数据。

上面示例的输出

<AppManager-response uri="/AppManager/xml/GetMonitorData">
<result>
<response response-code="4000">
<Monitorinfo DetailsPageURL="/showresource.do?resourceid=10001267&method=showResourceForResourceID&PRINTER_FRIENDLY=true"
TODAYUNAVAILPERCENT="0.0" HEALTHATTRIBUTEID="1651" TARGETADDRESS="" RESOURCENAME="app-xp2.csez.zohocorpin.com" TODAYAVAILPERCENT="100.0"
TARGETNAME="" TODAYSCHEDDOWNPERCENT="0.0" AVAILABILITYATTRIBUTEID="1650" HEALTHSEVERITY="5" DISKUTIL="-1" MANAGED="true" PHYMEMUTIL="-1"
AVAILABILITYMESSAGE="Resource up. <br>The resource APM-Windows is available." AVAILABILITYSEVERITY="5" TYPESHORTNAME="Windows" TYPE="Windows XP"
describe="Network Resource" LASTPOLLEDTIME="Mar 29, 2012 2:40 PM" RESOURCEID="10001267" TODAYUNMANGDPERCENT="0.0"
HEALTHMESSAGE="Health of APM-Windows is clear. <br>Root Cause : <br>1. Data Collection Successful<br>2. APM-Windows is up<br>"
CPUUTIL="-1" DISPLAYNAME="APM-Windows" HEALTHSTATUS="clear" RCAPageURL="/jsp/RCA.jsp?resourceid=10001267&attributeid=1651"
IMAGEPATH="/images/icon_monitors_windows.gif" AVAILABILITYSTATUS="up">
<Attribute DISPLAYNAME="Physical Memory Utilization" Value="37" Units=" %" AttributeID="1652" />
<Attribute DISPLAYNAME="Swap Memory Utilization" Value="No Data Available." Units=" %" AttributeID="1653" />
<Attribute DISPLAYNAME="CPU Utilization" Value="5" Units=" %" AttributeID="1657" />
<Attribute DISPLAYNAME="Free Physical Memory (MB)" Value="No Data Available." Units=" " AttributeID="1659" />
<Attribute DISPLAYNAME="CPU Utilization" Value="5" Units=" %" AttributeID="9641" />
<Attribute DISPLAYNAME="Total Disk Utilization(MB)" Value="40657" Units=" " AttributeID="1660" />
<Attribute DISPLAYNAME="Total Disk Utilization(%)" Value="16" Units=" " AttributeID="1661" />
<Attribute DISPLAYNAME="Total Disk FreeSpace(MB)" Value="215329" Units=" " AttributeID="1662" />
<Attribute DISPLAYNAME="Total Disk FreeSpace(%)" Value="84" Units=" " AttributeID="1663" />
<Attribute DISPLAYNAME="Disk Utilization" Value="16" Units=" %" AttributeID="711" />
<Attribute DISPLAYNAME="Disk Utilization" Value="40657" Units=" MB" AttributeID="712" />
<Attribute DISPLAYNAME="Free Disk Space(%)" Value="84" Units=" " AttributeID="736" />
<Attribute DISPLAYNAME="Free Disk Space(MB)" Value="215329" Units=" " AttributeID="737" />
<Attribute DISPLAYNAME="Response Time" Value="1" Units=" ms" AttributeID="1658" />
<CHILDMONITORS AVAILABILITYID="NA" DISPLAYNAME="Disk" HEALTHID="710">
<CHILDMONITORINFO DISPLAYNAME="C:" RESOURCEID="10001270" AVAILABILITYSEVERITY="-" HEALTHSEVERITY="-">
<CHILDATTRIBUTES DISPLAYNAME="Disk Utilization" Value="38" Units=" %" AttributeID="711" />
<CHILDATTRIBUTES DISPLAYNAME="Disk Utilization" Value="38495" Units=" MB" AttributeID="712" />
<CHILDATTRIBUTES DISPLAYNAME="Free Disk Space(%)" Value="62" Units=" " AttributeID="736" />
<CHILDATTRIBUTES DISPLAYNAME="Free Disk Space(MB)" Value="63902" Units=" " AttributeID="737" />
</CHILDMONITORINFO>
<CHILDMONITORINFO DISPLAYNAME="D:" RESOURCEID="10001271" AVAILABILITYSEVERITY="-" HEALTHSEVERITY="-">
<CHILDATTRIBUTES DISPLAYNAME="Disk Utilization" Value="1" Units=" %" AttributeID="711" />
<CHILDATTRIBUTES DISPLAYNAME="Disk Utilization" Value="2162" Units=" MB" AttributeID="712" />
<CHILDATTRIBUTES DISPLAYNAME="Free Disk Space(%)" Value="99" Units=" " AttributeID="736" />
<CHILDATTRIBUTES DISPLAYNAME="Free Disk Space(MB)" Value="151427" Units=" " AttributeID="737" />
</CHILDMONITORINFO>
</CHILDMONITORS>
<CHILDMONITORS AVAILABILITYID="NA" DISPLAYNAME="NetInterface" HEALTHID="730">
<CHILDMONITORINFO DISPLAYNAME="MS TCP Loopback interface" RESOURCEID="10001268" AVAILABILITYSEVERITY="-" HEALTHSEVERITY="-">
<CHILDATTRIBUTES DISPLAYNAME="Input Traffic" Value="75" Units=" Kbps" AttributeID="732" />
<CHILDATTRIBUTES DISPLAYNAME="Output Traffic" Value="75" Units=" Kbps" AttributeID="733" />
<CHILDATTRIBUTES DISPLAYNAME="Input Utilization" Value="0.0" Units=" (%)" AttributeID="734" />
<CHILDATTRIBUTES DISPLAYNAME="Ouput Utilization" Value="0.0" Units=" (%)" AttributeID="735" />
</CHILDMONITORINFO>
<CHILDMONITORINFO DISPLAYNAME="Realtek RTL8139 Family PCI Fast Ethernet NIC - Packet Scheduler Miniport" RESOURCEID="10001269" AVAILABILITYSEVERITY="-" HEALTHSEVERITY="-">
<CHILDATTRIBUTES DISPLAYNAME="Input Traffic" Value="61563" Units=" Kbps" AttributeID="732" />
<CHILDATTRIBUTES DISPLAYNAME="Output Traffic" Value="27866" Units=" Kbps" AttributeID="733" />
<CHILDATTRIBUTES DISPLAYNAME="Input Utilization" Value="0.06" Units=" (%)" AttributeID="734" />
<CHILDATTRIBUTES DISPLAYNAME="Ouput Utilization" Value="0.03" Units=" (%)" AttributeID="735" />
</CHILDMONITORINFO>
</CHILDMONITORS>
</Monitorinfo>
</response>
</result>
</AppManager-response>