Auto Collecting Engine Data

The collection of data require 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/.

You can run the REST API commands similar to OSGi commands. For more information, see Using HTTP Client to Connect to the Runtime.

In TIBCO BusinessWorks™ Container Edition the default path is:

user.dir\..\debug\APPNODE_DATA_<TIME_STAMP>.zip

REST API

API context http://<host>:<port>/bw/framework.json/collect/{operation}
Method POST
Authorization required YES
Header-parameter login
Operations
  • ALL
  • INCLUDE
  • EXCLUDE
  • DOWNLOAD
  • LIST
  • DELETE
For example:
http://<host>:<port>/bw/framework.json/collect/ALL

The operation details are as follows:

Operation Description
ALL This API is used for executing 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 JSON list.

Only listed operations are executed.

EXCLUDE This API accepts a list of commands or operations as an input in the form of JSON list. All default set operations excluding the set of operation given as input is executed.
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 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 authorization of the user. This option is mandatory.

For TIBCO BusinessWorks Container Edition use login = admin.

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 REST API on Docker or Kubernetes with default settings, applications should be deployed with root users. Non-root users can use the PATH header parameter to collect data at the given path.

On Cloud Foundry, 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 REST API:

    Docker command: REST API context path: http://<host>:<port>/bw/framework.json/collect/download