List Monitor API


ManageEngine Applications Manager provides List Monitor API that allows the user to list details of monitor by the following categories.

  1. By monitor type
  2. By monitor ResourceID
  3. Listing all the added monitors

This API lists all the monitors of a given type that are configured in Applications Manager for the user corresponding to the API Key. This details displayed includes the Health and Availability of the monitor types, image type, Health outages and Critical/Warning/Clear/UP/Down count for each monitor type.

APIs for ListMonitor

1. By monitor type

API for XML Response:

https://[HOST]:[PORT]/AppManager/xml/ListMonitor?apikey=[ API key ]&type=[ TYPE in AM_ManagedObject table ]

API for JSON Response:

https://[HOST]:[PORT]/AppManager/json/ListMonitor?apikey=[ API key ]&type=[ TYPE in AM_ManagedObject table ]

Supported HTTP methods: GET

Allowed roles: Administrator, Operator, User

2. By monitor ResourceID

API for XML Response:

https://[HOST]:[PORT]/AppManager/xml/ListMonitor?apikey=[ API key ]&resourceid=[ Resourceid ]

API for JSON Response:

https://[HOST]:[PORT]/AppManager/json/ListMonitor?apikey=[ API key ]&resourceid=[ Resourceid ]

Supported HTTP methods: GET

Allowed roles: Administrator, Operator, User

3. Listing all the added monitors

API for XML Response:

https://[HOST]:[PORT]/AppManager/xml/ListMonitor?apikey=[ API key ]&type=all

API for JSON Response:

https://[HOST]:[PORT]/AppManager/json/ListMonitor?apikey=[ API key ]&type=all

Supported HTTP methods: GET

Allowed roles: Administrator, Operator, User

 
Note:
a) For getting both Esx VirtualMachine and HyperV VirtualMachine , we can simply pass VirtualMachine as type
b) For getting all windows types, pass 'Windows' as type value
c) For all network devices (devices added to APM from OPM) simply pass 'NWD' as value for type.

Request Parameters

Field Description        
apikey The key generated from "Generate API" option in the Settings tab.
type "type=<monitor type>" is used to list all the monitors in a specified monitor type.
<monitor type>  is TYPE in AM_ManagedObject table like Linux, Windows XP, MYSQL-DB-server, Apache-server, UrlMonitor, Tomcat-server, etc.

To get all monitor types we need to pass 'all' as the value for the field type.

resourceid The resource ID of the monitor

Sample Requests

1. By monitor Type

https://apm-prod-server:8443/AppManager/xml/ListMonitor?apikey=aaaaaabbbbbbccccccddddddeeeeee&type=Windows

2. By monitor ResourceID

https://apm-prod-server:8443/AppManager/xml/ListMonitor?apikey=aaaaaabbbbbbccccccddddddeeeeee&resourceid=10000047

3. Listing all the added monitors

https://apm-prod-server:8443/AppManager/xml/ListMonitor?apikey=aaaaaabbbbbbccccccddddddeeeeee&type=all

Sample Response

Input:

https://apm-prod-server:8443/AppManager/xml/ListMonitor?apikey=aaaaaabbbbbbccccccddddddeeeeee&resourceid=1000003

Response:

<AppManager-response uri="/AppManager/xml/ListMonitor"><result><response response-code="4000"><Monitor DetailsPageURL="/showresource.do?resourceid=10000035&method=showResourceForResourceID&PRINTER_FRIENDLY=true" HEALTHATTRIBUTEID="1931" ASSOCIATEDGROUPS="Name:Applications Manager;Id:10000029,Name:SubGrp11;Id:10000105" RESOURCENAME="app-windows:9090.csez.zohocorpin.com" Managed="true" HEALTHSEVERITY="1" AVAILABILITYATTRIBUTEID="1930" AVAILABILITYMESSAGE="Resource up. <
>The resource app-windows:9090_Windows 7 is available." AVAILABILITYSEVERITY="5" TYPESHORTNAME="Windows" TYPE="Windows 7" DESCRIPTION="Network Resource" HOSTNAME="app-windows:9090.csez.zohocorpin.com" RESOURCEID="10000035" HEALTHMESSAGE="Health of app-windows:9090_Windows 7 is critical. <br>Root Cause : <br>1. aaa is down <br>2. 111 is down <br>" PORT="-1" DISPLAYNAME="app-windows:9090_Windows 7" RCAPageURL="/jsp/RCA.jsp?resourceid=10000035&attributeid=1931" HEALTHSTATUS="critical" HOSTIP="192.168.26.145" IMAGEPATH="/images/icon_monitors_windows.gif" AVAILABILITYSTATUS="up" LASTALARMTIME="1409221314773"/></response></result></AppManager-response>

Note: You can obtain the resourceid of a monitor by executing the ListMonitor API request. The output of this request contains resourceid of the monitor, among other values.

Response Parameters

Response Fields Decription
DISPLAYNAME Monitor's Display Name
RESOURCEID Monitor's Resource ID
TYPE Monitor type like Windows, Linux
Health Details Contains
HEALTHMESSAGE - Which gives the Health Root Cause Message
HEALTHATTRIBUTEID Health Attribute ID 
HEALTHSTATUS - Current health status of the monitor. It can have values clear or warning or critical
HEALTHSEVERITY - Health status in number. Number 1 represents critical, 4 represents warning and 5 represents clear.
Availability Details Contains
AVAILABILITYMESSAGE - Which gives the Availability Root Cause Message

AVAILABILITYATTRIBUTEID - Availability Attribute ID
AVAILABILITYSTATUS - Current availability status of the monitor. It can have values up or down
AVAILABILITYSEVERITY - Availability status in number. Number 5 represents up and number 1 represents down.
Managed True - the monitor is in Managed state, False - the monitor is in Unmanaged State
RESOURCENAME Monitor's Resource Name
DESCRIPTION Description of the Resource like Network Resource
RCAPageURL URL that links to Root Cause Analysis details
DetailsPageURL URL that links to details page of the monitor
LASTALARMTIME This is the time (Unix epoch in milliseconds) at which last alarm has been generated.
IMAGEPATH This monitor type's icon image path
ASSOCIATEDGROUPS Monitor groups to which this monitor is associated with
TYPESHORTNAME Display name of the monitor type.
HOSTNAME Name of the server which is being monitored or the server in which application is installed and being monitored from Applications Manager.
LAST_POLLED_TIME Last data collected time for the monitor (Unix epoch in milliseconds). Parameter is not included when ListMonitor API is executed from Admin server.
PORT Port number used by the application.
HOSTIP IP Address of the server which is being monitored or the server in which application is installed and being monitored from Applications Manager.