Skip to content

2. APM Monitoring Target Configuration

What This Chapter Does

It fetches the list of what is being monitored right now. It shows how the application groups and the WAS instances, web servers, and systems beneath them are configured.

Why call it first -- the metric query API (chapter 3) takes the group name and instance name as arguments. Those names come from here. Hard-coding the names means editing the code every time a target is added or changed, so an integration program is better off querying the list with this API first.

Application Group Configuration

This API returns the configuration of the OPENMARU APM monitoring targets. It returns the application groups and, for each application group, the WAS instance configuration per machine, and the instance configuration per machine for web servers, WAS instances, and systems.

Request

ItemDescription
URL/monitoring/api/metrics/APP
HTTP METHODGET
Content-Typeapplication/json
ParametersNone

Response

Key
Response BodyThe content of the response JSON string is as follows.
APP configuration{"applications": [{"name": "shop","uuid": null,"builtIn": true,"enable": true,"hosts": [{"ip": "192.168.23.22","type": "APP","instances": [{"name": "shop12","status": "STOPPED"}],"instanceCount": 1,"instanceIds": ["shop12"],"sortable": true},{"ip": "192.168.23.23","type": "APP","instances": [{"name": "shop22","status": "RUNNING"}],"instanceCount": 1,"instanceIds": ["shop22"],"sortable": true}],"hostIpsAsString": "192.168.23.22:192.168.23.23","hostIps": ["192.168.23.22","192.168.23.23"],"hostInstancesAsString": "shop12:shop22","hostInstances": ["shop12","shop22"],"sortable": true},… }

Using a tool such as a JSON editor makes the object structure of the response easy to grasp, as in the picture below.

Response Items

ItemTypeDescription
applicationsApplication ArrayThe application group configuration. See the Application items below
totalInstancesIntegerThe total number of WAS instances
wasHostGroupHost ArrayWAS instance information per machine. See the Host items below
webHostGroupHost ArrayWEB instance information per machine. See the Host items below
sysHostGroupHost ArraySYS instance information per machine. See the Host items below
sortableBooleanWhether sorting is possible

Application Items

ItemTypeDescription
nameStringRepresents the application group information
uuidStringThe application UUID. A value is returned only for a user-defined application; otherwise null is returned
builtInBooleanfalse for a user-defined application, true for an application the system defined
enableBooleanShows whether it is in use
hostsHost Array→ See the Host items below
hostIpsAsStringStringReturns the host IPs as a string separated by ":"
hostIpsString ArrayReturns the host IP list as a string array
hostInstancesAsStringStringReturns all instances of the host as a string separated by ":"
hostInstancesString ArrayReturns the host's instances as a string array
sortableBooleanWhether sorting is possible

Host Items

ItemTypeDescription
ipStringRepresents the application group information
TypeStringThe type of the server. "WAS": WAS monitoring data is being collected. "SYS": system monitoring data is being collected. "WEB": web server monitoring data is being collected
instancesObject ArrayThe instances item appears only when Type is WAS or WEB
instances[].nameStringThe WAS instance name
instances[].statusStringThe state of the WAS instance -- RUNNING or STOPPED
instanceCountIntegerThe number of instances on this machine
instanceIdsString ArrayA string array of the WAS instances on this machine (shown only for WAS and WEB)
sortableBoolean