ManageEngine® Applications Manager 列出监视器API |
||
ManageEngine Applications Manager提供了让用户通过下面方式列出监视器详细信息的API。
通过监视器类型
同监视器资源ID(ResourceID)
列出所有添加的监视器
列出监视器API
1. 通过监视器类型:
http://[ Host ]:[ Port ]/AppManager/xml/ListMonitor?apikey=[ API key
]&type=[ TYPE in AM_ManagedObject table ]
2. 通过监视器名称:
http://[ Host ]:[ Port ]/AppManager/xml/ListMonitor?apikey=[ API key ]&resourceid=[
Resourceid ]
3. 列出所有添加的监视器:
http://[ Host ]:[ Port ]/AppManager/xml/ListMonitor?apikey=[ API key ]&type=all
4. XML响应API:
http://[ APM Host ]:[ APM Port ]/AppManager/xml/ListMonitor?apikey=[
API Key ]&type=all
5. JSON响应API:
http://[ APM Host ]:[ APM Port ]/AppManager/json/ListMonitor?apikey=[
API Key ]&type=[Type]
注意:
a) 我们可以将type设置为VirtualMachine获取到Esx和HyperV的虚拟机
b) 获取所有Windows类型,传递“Windows'”作为type值
c) 对于所有的网络设备(从OPM或OpStor添加进来的设备),可以传递“NWD”作为type值
请求参数
字段 | 描述 |
API Key | 在管理页签中的生成的API键值。 |
Type | "type=<monitor type>" 用来列出指定类型中所有的监视器。 <monitor type> 是AM_ManagedResourceType表中SHORTNAME字段。如Linux、Windows、MS SQL、Apache、Service Monitoring、Url Sequence、Tomcat等等。 |
resourceid | 监视器的资源ID。 |
附加属性
IMAGEPATH | 监视器类型图片路径 |
LASTALARMTIME | 这是上一次告警生成的时间 |
通过监视器类型获取监视器XML的API示例
http://app-windows:9090/AppManager/xml/ListMonitor?apikey=[ Api Key
]&type=Windows
获取所有监视器XML的API示例
http://app-windows:9090/AppManager/xml/ListMonitor?apikey=65d0fa3e1f6c6bdcce1c3969f24c39a8&type=all
获取指定监视器XML的API示例
http://app-windows:9090/AppManager/xml/ListMonitor?apikey=65d0fa3e1f6c6bdcce1c3969f24c39a8&resourceID=10000047
示例输出:
监视器详细信息
DISPLAYNAME | 监视器显示名称 |
RESOURCE ID | 监视器的资源ID |
TYPE | 监视器的类型。如:Windows、Linux |
Health Details | 包含HEALTHMESSAGE(显示健康状况的根本原因),健康状况属性ID, HEALTHSEVERITY - (5/4/1) - 正常/警告/严重 , STATUS - 正常/警告/严重(Clear/Warning/Critical) |
Availability Details | 包含AVAILABILITYMESSAGE(显示可用行的根本原因),可用性属性ID, AVAILABILITYSEVERITY - 运作/停止(5/1), STATUS - 运作/停止(UP/Down) |
Managed | True - 监视器处于管理状态,False - 监视器处于未管理状态 |
RESOURCENAME | 监视器的资源名称 |
DESCRIPTION | 资源描述。如:Network Resource |
RCAPageURL | 链接到根本原因分析详细信息的URL |
DetailsPageURL | 链接到监视器的详细信息页面的URL |
LASTALARMTIME | 上一次告警生成的时间 |
XML输入: http://app-windows:9090/AppManager/xml/ListMonitor?apikey=65d0fa3e1f6c6bdcce1c3969f24c39a8&type=all
响应: <AppManager-response uri="/AppManager/xml/ListMonitor"> <result> <response response-code="4000"> <MonitorDetailsPageURL="/showresource.do?resourceid=10000048&method=showResourceForResourceID&PRINTER_FRIENDLY=true" HEALTHATTRIBUTEID="153" ASSOCIATEDGROUPS="Applications Manager,My App2" RESOURCENAME="172.18.90.117" Managed="true" HEALTHSEVERITY="5" AVAILABILITYATTRIBUTEID="152" AVAILABILITYMESSAGE="Resource up. <br>The resource 172.18.90.117 is available." TYPESHORTNAME="Service Monitoring" TYPE="Port-Test" DESCRIPTION="Port-Test Monitoring: for 172.18.90.117" AVAILABILITYSEVERITY="5" RESOURCEID="10000048" HEALTHMESSAGE="Health of 172.18.90.117 is clear. <br>Root Cause : <br>1. Response Time 2 <= 1500 ms (threshold).<br>2. 172.18.90.117 is up<br>" DISPLAYNAME="172.18.90.117" RCAPageURL="/jsp/RCA.jsp?resourceid=10000048&attributeid=153" HEALTHSTATUS="clear" IMAGEPATH="/images/icon_monitors_servicemonitoring.gif" AVAILABILITYSTATUS="up" LASTALARMTIME="0"/><Monitor DetailsPageURL="/showresource.do?resourceid=10000047&method=showResourceForResourceID&PRINTER_FRIENDLY=true" HEALTHATTRIBUTEID="9301" ASSOCIATEDGROUPS="Applications Manager,My App2" RESOURCENAME="localhost" Managed="true" HEALTHSEVERITY="5" AVAILABILITYATTRIBUTEID="9300" AVAILABILITYMESSAGE="Resource up. <br>The resource 172.18.90.117_PGSQL is available." TYPESHORTNAME="PostgreSQL" TYPE="PostgreSQL" DESCRIPTION="PostgreSQL Monitoring: for localhost" AVAILABILITYSEVERITY="5" RESOURCEID="10000047" HEALTHMESSAGE="Health of 172.18.90.117_PGSQL is clear. <br>Root Cause : <br>1. 172.18.90.117_PGSQL is up<br>" DISPLAYNAME="172.18.90.117_PGSQL" RCAPageURL="/jsp/RCA.jsp?resourceid=10000047&attributeid=9301" HEALTHSTATUS="clear" IMAGEPATH="/images/icon_monitors_postgres.gif" AVAILABILITYSTATUS="up" LASTALARMTIME="0"/><Monitor TIMEOUT="3" DetailsPageURL="/showresource.do?resourceid=10000049&method=showResourceForResourceID&PRINTER_FRIENDLY=true" REQUESTPARAMETERS="" HEALTHATTRIBUTEID="401" ASSOCIATEDGROUPS="Applications Manager" USERNAME="" URL="http://rashmi-1335:9090" RETRY="Yes" RESOURCENAME="http://rashmi-1335:9090" Managed="true" HEALTHSEVERITY="5" AVAILABILITYATTRIBUTEID="400" AVAILABILITYMESSAGE="Resource up. <br>The resource AppManager Home Page is available.<span></span>ResponseCode - 200" TYPESHORTNAME="Url Monitor" TYPE="UrlMonitor" DESCRIPTION="URL Monitor for http://rashmi-1335:9090" AVAILABILITYSEVERITY="5" RESOURCEID="10000049" CHECKCONTENT="applications" METHOD="Get" HEALTHMESSAGE="Health of AppManager Home Page is clear. <br>Root Cause : <br>1. AppManager Home Page is up<br>2. Response Time 21 <= 1500 ms (threshold).<br>" DISPLAYNAME="AppManager Home Page" RCAPageURL="/jsp/RCA.jsp?resourceid=10000049&attributeid=401" HEALTHSTATUS="clear" ERRORCONTENT="Error" POLL="10" IMAGEPATH="/images/icon_monitors_urlmonitor.gif" AVAILABILITYSTATUS="up" LASTALARMTIME="1385008485848"/><Monitor DetailsPageURL="/showresource.do?resourceid=10000046&method=showResourceForResourceID&PRINTER_FRIENDLY=true" HEALTHATTRIBUTEID="751" ASSOCIATEDGROUPS="-" RESOURCENAME="rashmi-1335.csez.zohocorpin.com" Managed="true" HEALTHSEVERITY="-" AVAILABILITYATTRIBUTEID="750" AVAILABILITYMESSAGE="-" TYPESHORTNAME="Unknown" TYPE="Node" DESCRIPTION="Network Resource" AVAILABILITYSEVERITY="-" RESOURCEID="10000046" HEALTHMESSAGE="-" DISPLAYNAME="rashmi-1335" RCAPageURL="/jsp/RCA.jsp?resourceid=10000046&attributeid=751" HEALTHSTATUS="UnKnown" IMAGEPATH="/images/icon_monitors_unknown.gif" AVAILABILITYSTATUS="UnKnown" LASTALARMTIME="0"/><Monitor DetailsPageURL="/showresource.do?resourceid=10000050&method=showResourceForResourceID&PRINTER_FRIENDLY=true" HEALTHATTRIBUTEID="16" ASSOCIATEDGROUPS="-" RESOURCENAME="IF-rashmi-1335.csez.zohocorpin.com_Tomcat-server_9090" Managed="true" HEALTHSEVERITY="-" AVAILABILITYATTRIBUTEID="15" AVAILABILITYMESSAGE="-" TYPESHORTNAME="Tomcat" TYPE="Tomcat-server" DESCRIPTION="Network Resource" AVAILABILITYSEVERITY="-" RESOURCEID="10000050" HEALTHMESSAGE="-" DISPLAYNAME="rashmi-1335_Tomcat Server_9090" RCAPageURL="/jsp/RCA.jsp?resourceid=10000050&attributeid=16" HEALTHSTATUS="UnKnown" IMAGEPATH="/images/icon_monitors_tomcat.gif" AVAILABILITYSTATUS="UnKnown" LASTALARMTIME="0"/> </response> </result> </AppManager-response> |
列出仪表板 |
列出服务组 |