6. Application Group Management
What This Chapter Does
It manages application groups through the API. A group is the unit that bundles instances by service, and most of the console's screens show data at this unit.
When to use it -- in deployment automation, to create the group at the same time a new
service goes up. The group name has to match application.name in the agent configuration for the
instance to land in that group.
Application Groups
Query
Fetches the registered application groups and the hosts and instances in each.
| Item | Description |
|---|---|
| URL | /monitoring/api/metrics/APP?exclusion=false |
| Example request URL | /monitoring/api/metrics/APP?exclusion=false |
| HTTP METHOD | GET |
| Content-Type | application/json; charset=UTF-8 |
| Body | |
| Response | See below |
Example response
{
"applications": [
{
"name": "ALL",
"uuid": "87DC0B05-AB5C-4667-9493-CB08D8619E84",
"builtIn": false,
"enable": true,
"firstDate": 1527052065813,
"lastDate": 1534469380921,
"hosts": [ … ]
}
]
}
firstDate and lastDate are when data first and last arrived for this group (Unix epoch
milliseconds). When builtIn is true, the group was created by the product and cannot be renamed
or deleted.
Create
Creates a new group. The name has to match application.name in the agent configuration for
that instance to land in this group.
| Item | Description |
|---|---|
| URL | /monitoring/api/customgroup/group |
| Example request URL | /monitoring/api/customgroup/group |
| HTTP METHOD | PUT |
| Content-Type | application/json; charset=UTF-8 |
| Body | {groupId: "EAP_GROUPS1", uuid: "89A43B84-7D49-466C-A172-8F28AAA29ED9"} |
| Response | {"status": 200} |
Update and Registering an Instance Regular Expression
Renames the group, or bundles instances with a regular expression. Where a naming rule is fixed, one regular expression brings new instances in automatically.
| Item | Description |
|---|---|
| URL | /monitoring/api/customgroup/uuid/${UUID} |
| Example request URL | /monitoring/api/customgroup/uuid/89A43B84-7D49-466C-A172-8F28AAA29ED9 |
| HTTP METHOD | PUT |
| Content-Type | application/json; charset=UTF-8 |
| Body | { uuid: "89A43B84-7D49-466C-A172-8F28AAA29ED9", groupId: "EAP_GROUPS", regexp: "^eap71-.*"} |
| Response | {"status": 200} |
Delete
Deletes the group. The collected data is not deleted -- only the grouping disappears.
| Item | Description |
|---|---|
| URL | /monitoring/api/customgroup/uuid/${UUID} |
| Example request URL | /monitoring/api/customgroup/uuid/89A43B84-7D49-466C-A172-8F28AAA29ED9 |
| HTTP METHOD | DELETE |
| Content-Type | application/json; charset=UTF-8 |
| Body | |
| Response | {"status": 200} |