Auto Collecting Engine Data
The collection of data requires multiple engine API (OSGi commands). These APIs are invoked internally and output is exported in file format at a specified location.
A REST API is provided to collect engine data. Invoke the REST API as POST: http://<host>:<port>/bw/framework.json/collect/
.
The default path in TIBCO BusinessWorks Container Edition is:
user.dir\..\debug\APPNODE_DATA_<TIME_STAMP>.zipREST API
API context | http://<host>:<port>/bw/framework.json/collect/{operation} |
Method | POST |
Authorization required | YES |
Header-parameter | login |
Operations |
For example: http://<host>:<port>/bw/framework.json/collect/ALL |
The operation details are as follows:
Operation | Description |
---|---|
ALL |
This API is used for running the default set of operations.
The default set of operations is as follows: ["THREAD_DUMP", "HEAP_DUMP", "VM_ARGUMENTS","ENVIRONMENT_VARIABLES", "SYSTEM_PROPERTIES", "THREAD_SNAPSHOT","MEMORY_SNAPSHOT", "SYSTEM_PROCESS_INFORMATION","CPU_INFORMATION","LMETRICS", "LCFG", "LP", "LA", "LENDPOINTS","LAPI *"] |
INCLUDE |
This API accepts a list of commands or operations as an input in the form of a JSON list.
Only the listed operations run. |
EXCLUDE |
This API accepts a list of commands or operations as an input in the form of a JSON list. All default set operations excluding the set of operations given as input runs. |
DOWNLOAD |
This API is available to download all collected data as a stream APPLICATION_OCTET_STREAM |
LIST |
This API is available to list the files present. |
DELETE |
This API is available to delete data files created. |
Header Parameter | Description |
---|---|
PATH |
An optional parameter to provide a directory path where the data is collected or is downloaded. |
OVERRIDE |
An option for collect data operation [ALL, INCLUDE, EXCLUDE], where the data collected previously is overwritten by the new data.
The default value is TRUE. |
ALL |
An option for operation DOWNLOAD, where all files present are compressed at one file with the name APPNODE_DATA.zip and downloaded at once. The default value is FALSE.
|
DOWNLOADANDDELETE |
An option for operation DOWNLOAD, where the file is deleted after the download operation.
The default value is FALSE. |
LOGIN |
This option is required for the authorization of the user. This option is mandatory.
For
TIBCO BusinessWorks Container Edition use
|
API consumes entity: INPUT
Required header parameter: Content-Type=application/json
JSON list of commands: Sample input: ["command1", "command2"]
.
Applicable for INCLUDE
and EXCLUDE
operations.
To use the REST API on Docker or Kubernetes with default settings, applications must be deployed with root users. Non-root users can use the PATH header parameter to collect data at the given path.
On Cloud Foundry, the REST API supports route URL with HTTP Protocol only.
The options to copy data from container to host machine in TIBCO BusinessWorks Container Edition are as follows:
- Mount Volume to the container:
Docker command:
docker run -v <host_dir>:<container_dir> <image_name>
- Copy command to copy a file:
Docker command:
docker cp <containerID>:<file_path> <host_destination>
- Using the REST API:
Docker command:
REST API context path: http://<host>:<port>/bw/framework.json/collect/download