ManageEngine® Applications Manager 搜索 |
||
这个API可以获取匹配搜索字段和条件的监视器/业务组的列表,搜索的范围限于指派给用户的监视器列表。
XML响应API:
http://[ APM Host ]:[ APM Port ]/AppManager/xml/Search?apikey=[ API Key]&query=[query]&searchCondition=[searchCondition]
JSON响应API:
http://[ APM Host ]:[ APM Port ]/AppManager/json/Search?apikey=[ API Key]&query=[query]&searchCondition=[searchCondition]
请求参数
字段 | 描述 |
query | 这是值用来搜索关联给用户的监视器列表 |
其他参数:
字段 | 描述 |
searchCondition | 该值指定要在列表中查找的监视器类型。例如 - 显示名称、监视器类型、IP地址和自定义字段 |
响应明细
字段 | 描述 |
Type | 这代表在搜索结果中的元素类型 |
HealthStatus | 这是搜索元素的健康状态 |
AvailabilityMessage | 这是搜索元素的可用性消息 |
DisplayName | 这是搜索元素的显示名 |
ManagedServer | 这是监视器或组所在的管理服务器,对于专业版这个值为“NA” |
AvailabilityStatus | 这是搜索元素的可用性状态 |
SubGroup | 这是元素所属的分类 |
ResourceId | 这是搜索元素的resourceid |
HealthMessage | 这是搜索元素的健康消息 |
HealthSeverity | 这是搜索元素的健康性严重性 |
ImagePath | 这是监视器类型/业务组的图标路径 |
AvailabilitySeverity | 这是搜索元素的可用性严重级别 |
DetailsPageURL | 这是搜索元素的明细页面 |
<response response-code="4000"><Monitor Type="Linux" HealthStatus="clear" AvailabilityMessage="Resource up. <br>The resource karthi linux is available." DisplayName="karthi linux" ManagedServer="Admin Server" AvailabilityStatus="up" SubGroup="Linux" ResourceId="10000117" HealthMessage="Health of karthi linux is clear. <br>Root Cause : <br>1. karthi linux is up<br>2. Data Collection Successful<br>" HealthSeverity="5" ImagePath="/images/icon_monitors_linux.gif" AvailabilitySeverity="5" DetailsPageURL="/showresource.do?resourceid=10000117&method=showResourceForResourceID&PRINTER_FRIENDLY=true"/><Monitor Type="Linux" HealthStatus="clear" AvailabilityMessage="Resource up. <br>The resource app-centos32-1 is available." DisplayName="app-centos32-1" ManagedServer="Admin Server" AvailabilityStatus="up" SubGroup="Linux" ResourceId="10000108" HealthMessage="Health of app-centos32-1 is clear. <br>Root Cause : <br>1. app-centos32-1 is up<br>2. Data Collection Successful<br>" HealthSeverity="5" ImagePath="/images/icon_monitors_linux.gif" AvailabilitySeverity="5" DetailsPageURL="/showresource.do?resourceid=10000108&method=showResourceForResourceID&PRINTER_FRIENDLY=true"/><Monitor Type="Linux" HealthStatus="clear" AvailabilityMessage="Resource up. <br>The resource prasadh linux is available." DisplayName="prasadh linux" ManagedServer="Admin Server" AvailabilityStatus="up" SubGroup="Linux" ResourceId="10000071" HealthMessage="Health of prasadh linux is clear. <br>Root Cause : <br>1. prasadh linux is up<br>2. Data Collection Successful<br>" HealthSeverity="5" ImagePath="/images/icon_monitors_linux.gif" AvailabilitySeverity="5" DetailsPageURL="/showresource.do?resourceid=10000071&method=showResourceForResourceID&PRINTER_FRIENDLY=true"/></response> |
JSON输入 http://apm-prod1:9090/AppManager/json/Search?apikey=4f77fe9c75f4472764a07846bf7f032d&query=linux&searchCondition=monitortype JSON响应 {"response":{"result":[{"Type":"Linux","HealthStatus":"clear","AvailabilityMessage":"Resource up. <br>The resource app-centos32-1 is available.","DisplayName":"app-centos32-1","ManagedServer":"Admin Server","AvailabilityStatus":"up","SubGroup":"Linux","ResourceId":"10000108","HealthMessage":"Health of app-centos32-1 is clear. <br>Root Cause : <br>1. app-centos32-1 is up<br>2. Data Collection Successful<br>","HealthSeverity":"5","ImagePath":"/images/icon_monitors_linux.gif","AvailabilitySeverity":"5","DetailsPageURL":"/showresource.do?resourceid=10000108&method=showResourceForResourceID&PRINTER_FRIENDLY=true"},{"Type":"Linux","HealthStatus":"clear","AvailabilityMessage":"Resource up. <br>The resource karthi linux is available.","DisplayName":"karthi linux","ManagedServer":"Admin Server","AvailabilityStatus":"up","SubGroup":"Linux","ResourceId":"10000117","HealthMessage":"Health of karthi linux is clear. <br>Root Cause : <br>1. karthi linux is up<br>2. Data Collection Successful<br>","HealthSeverity":"5","ImagePath":"/images/icon_monitors_linux.gif","AvailabilitySeverity":"5","DetailsPageURL":"/showresource.do?resourceid=10000117&method=showResourceForResourceID&PRINTER_FRIENDLY=true"},{"Type":"Linux","HealthStatus":"clear","AvailabilityMessage":"Resource up. <br>The resource prasadh linux is available.","DisplayName":"prasadh linux","ManagedServer":"Admin Server","AvailabilityStatus":"up","SubGroup":"Linux","ResourceId":"10000071","HealthMessage":"Health of prasadh linux is clear. <br>Root Cause : <br>1. prasadh linux is up<br>2. Data Collection Successful<br>","HealthSeverity":"5","ImagePath":"/images/icon_monitors_linux.gif","AvailabilitySeverity":"5","DetailsPageURL":"/showresource.do?resourceid=10000071&method=showResourceForResourceID&PRINTER_FRIENDLY=true"}],"uri":"/AppManager/json/Search"},"response-code":"4000"} |
列出用户信息 |
显示轮询数据 |