How to monitor TIBCO apps Performance using JConsole

26 Feb 2021

blog details

How to monitor TIBCO apps Performance using JConsole

By: RSDigitech | Published At : 26 Feb 2021    


INTRODUCTION:

how to monitor Tibco be engine with jconsole

Using a JMX-compliant monitoring tool such as JConsole can be useful for other purposes. For example, MBeans enable you to see cache details if you are using Coherence as the cache provider.

If trying to connect to remote process/service/engine from local machine, we need to ensure that remote process/service/engine configuration is enabled for remote JMX monitoring. To enable JMX remote monitoring for a TIBCO BE Engine follow below steps.

Steps for monitoring Tibco apps performance using jconsole

1.    To enable a JMX-compliant monitoring tool to view the exposed MBeans, set these properties in the BE_HOME/bin/be-engine.tra file.

java.property.com.sun.management.jmxremote=true

java.property.com.sun.management.jmxremote.ssl=false

java.property.com.sun.management.jmxremote.port=

be.engine.jmx.connector.port=

 

(Note - be.engine.jmx.connector.port and java.property.com.sun.management.jmxremote.port add these properties to be-engine.tra file, don’t assign any value otherwise it will result in port conflict between different be engines later on)

2.     Once the above properties are correctly added in “be-engine.tra” file, deploy the TIBCO BE application, these properties will be picked and included in BE application engine TRA files. For each BE engine TRA file assign a different value to “jmxremote.port” and “jmx.connector.port“ to avoid port conflict errors like below. Also JConsole will be able to connect to the port value given to “jmx.connector.port“ propert

[[email protected] TEST_PDLM_BE_DEMO]$ Error: Exception thrown by the agent:java.rmi.server.ExportException: Port already in use: 5558; nested exception is:

java.net.BindException: Address already in use

3.     Navigate to following path, copy and rename file “jmxremote.password.template” to jmxremote.password

C:\tibco\tibcojre64\1.7.0\lib\management\

4.     You may add the following password entries at the end in jmxremote.password file, but these will be used only when authentication is enabled.

# Following are two commented-out entries. The "measureRole" role has

# password "QED". The "controlRole" role has password "R&D".

# monitorRole QED

# controlRole  R&D

monitorRole admin

controlRolenewadmin

 

5.     The most critical thing is permission for this file, if the permissions are not correct following errors will occur at the time of BE engine startup once JMX is enabled ,as per description in file itself, only owner of file should have read permission on this file,so in UNIX/LINUX you need to assign 400 (chmod 400) permission to this file.

 

##############################################################

#     Since there are cleartext passwords stored in this file,

#     this file must be readable by ONLY the owner,

#     otherwise the program will exit with an error.

[[email protected] TEST_PDLM_BE_DEMO]$ ./TEST_PDLM_BE_DEMO-TEST_PDLM_BE_DEMO_-_Cache.sh

Error: Password file not found: /opt/tibco/tibcojre64/1.7.0/lib/management/jmxremote.password

[[email protected] TEST_PDLM_BE_DEMO]$ cd /opt/tibco/tibcojre64/1.7.0/lib/management/

 

[[email protected] TEST_PDLM_BE_DEMO]$ ./TEST_PDLM_BE_DEMO-TEST_PDLM_BE_DEMO_-_Cache.sh

Error: Password file read access must be restricted: /opt/tibco/tibcojre64/1.7.0/lib/management/jmxremote.password

 

6.     Once the port value is assigned in the BE engine TRA file once you start the engine, you can see and verify that JMX monitoring has been enabled at the time of engine start-up and available at port which was mentioned .

 

099 GMT -4 TEST_PDLM_BE_DEMO-TEST_PDLM_BE_DEMO_-_Cache Info [main] - [runtime.service] Registering all BE-Engine level Group MBeans...

2015 Apr 16 14:24:13:106 GMT -4 TEST_PDLM_BE_DEMO-TEST_PDLM_BE_DEMO_-_Cache Info [main] - [runtime.service] All BE-Engine level Group MBeans SUCCESSFULLY registered

2015 Apr 16 14:24:13:108 GMT -4 TEST_PDLM_BE_DEMO-TEST_PDLM_BE_DEMO_-_Cache Info [main] - [runtime.service] Starting secure JMX connector server @10.28.184.39:5889

2015 Apr 16 14:24:13:393 GMT -4 TEST_PDLM_BE_DEMO-TEST_PDLM_BE_DEMO_-_Cache Info [main] - [runtime.service] Secure JMX connector server SUCCESSFULLY started @10.28.184.39:5889

2015 Apr 16 14:24:13:393 GMT -4 TEST_PDLM_BE_DEMO-TEST_PDLM_BE_DEMO_-_Cache None [main] - [runtime.session] BE Engine TEST_PDLM_BE_DEMO-TEST_PDLM_BE_DEMO_-_Cache started

*********************************************

JConsole can be invoked by navigating to following path (Supported from JAVA version 1.7.0 onwards)

C:\Program Files (x86)\Java\jdk1.7.0_76\bin\jconsole.exe

Sample Console Screenshot

Java Monitoring

 

1.     Once remote JMX monitoring is enabled, invoke JMX console by passing the remote machine IP and the port details which you have used in JMX properties.

JConsole new connection

2.     As we have not enabled SSL, chose the “Insecure” option in below pop-up window.

secure connection failedjava monitoring & management console


3.     Following window will appear once successfully connected, it reflects heap memory and CPU usage of engine

4.     Navigate and browse other windows.

In “MBeans” tab window you can see and invoke operations which are same java methods available via hawk microagent methods.On the JConsole window, click the MBeans tab. Select the node com.tibco.be in the tree on the right-hand side. The methods available to monitor the Business Events engine are displayed under the Operations tab. These methods are the TIBCO Hawk Microagent methods that you can also invoke using TIBCO Hawk.

MBeans

5.     You can invoke any method and the operation values will be returned

 

operation return value

 

6.     You can see the memory usage and can perform explicit Garbage Collection in Memory Tab via “Perform GC” button

memory

 

7.     Virtual Memory and Operating Systems Details can be obtained from “VM Summary” tab.

VM Summary

Technologywe use

  • PHP
  • Angular
  • Android
  • Laravel
  • Salesforce
  • Tibco
  • Mulesoft