Enabling Java Business Transaction Monitoring for Atlassian Confluence
The steps for BTM-enabling Atlassian Confluence will differ based on where the eG agent monitoring Confluence has been deployed - whether on the Confluence server, or on a remote host.
Agent-based Approach to Deploying eG Java BTM on Atlassian Confluence
If Atlassian Confluence is monitored in an agent-based manner, then follow the steps below to BTM-enable the Confluence server:
- Login to the system hosting Atlassian Confluence.
- Open a browser on the node, connect to the eG manager, and login to the eG admin interface.
- Manage Atlassian Confluence as a separate component using the eG administrative interface. When managing, make sure you leave the Agentless flag unchecked.
- If multiple Confluence instances are operating on a single node, and you want to BTM-enable all the instances, then you will have to manage each instance as a separate component using the eG administrative interface.
-
Next, follow the Agents -> BTM Profiler Settings menu sequence in the eG admin interface. Figure 1 will then appear, listing the Java application servers managed in the environment. Locate the Atlassian Confluence server that you managed recently in that list, and click the Copy JVM icon () corresponding to it (see Figure 1).
Figure 1 : Clicking the Copy JVM option corresponding to the Atlassian Confluence component managed in an agent-based manner
-
Figure 2 will then appear. Copy the JVM option displayed in Figure 2 to the clip board or any text editor.
Figure 2 : Copying the JVM option displayed in the admin interface to a clip board or text editor
-
Then, proceed to edit the start-up script of the Atlassian Confluence being monitored. For this, first open the catalina.bat file in the <<ATLASSIAN_HOME>>\confluence\bin directory (on Windows; on Unix, open the catalina.sh file in the /opt/atlassian/confluence/bin directory).
-
In the catalina.bat file (i.e., on a Windows installation of Confluence), look for the entry that begins with set "JAVA_OPTS=%JAVA_OPTS%. Append the code block you copied at step 6 above to that entry. In the catalina.sh file (i.e., on a Unix installation of Confluence) on the other hand, you should look for the JAVA_OPTS="$JAVA_OPTS entry, and append the code block of Figure 2 to it.
-
-
After inserting the copied JVM option, make sure that you replace the <<EGURKHA_AGENT_HOME>> tag in the copied code block with the actual install directory of the eG agent deployed on the system hosting Atlassian Confluence.
A sample JAVA_OPTS specification on Windows (i.e., in catalina.bat) will be as follows:
set "JAVA_OPTS=%JAVA_OPTS% -javaagent C:/eGurkha/lib/apm/Java/default/eg_btm.jar=component_guid=ecozxmw5q4yh5typqkioh3ww6pafrf62:26771508-08da-4944-bf96-2c096eeb2fe2
A sample JAVA_OPTS specification on Unix (i.e., in catalina.sh) will be as follows:
JAVA_OPTS="$JAVA_OPTS -javaagent /opt/egurkha/lib/apm/Java/default/eg_btm.jar=component_guid=ecozxmw5q4yh5typqkioh3ww6pafrf62:26771508-08da-4944-bf96-2c096eeb2fe2
-
Next, add the package com.eg in the boot delegation framework. For this, you need to add an entry to this effect in the catalina.bat file (on Windows; on Unix, this will be the catalina.sh file). Figure 3 depicts how this can be done on Windows and Figure 4 depicts how this can be achieved on Unix.
Figure 3 : Adding the com.eg package in the boot delegation framework in catalina.bat
Figure 4 : Adding the com.eg package in the boot delegation framework in catalina.sh
-
Next, save the file.
-
Finally, restart the Confluence server. For this, first go to the command prompt and switch to the <<ATLASSIAN_CONFLUENCE_HOME>>\confluence\bin directory (on Windows; on Unix, go to the /opt/atlassian/confluence/bin directory). Then, run the following command at the Windows prompt:
Start-confluence.bat /fg
On the Unix shell prompt on the other hand, run the following command:
Start-confluence.sh /fg
- Where multiple Confluence server instances on a host are to be monitored, Repeat 5 to 12 for each of the server instances.
Agentless Approach to Deploying eG Java BTM on an Atlassian Confluence Server
If Atlassian Confluence is monitored in an agentless manner, then follow the steps below to BTM-enable that Confluence server:
- Login to the system hosting Atlassian Confluence.
- Open a browser on the node, connect to the eG manager, and login to the eG admin interface.
- Manage Atlassian Confluence as a separate component using the eG administrative interface. When managing, make sure you enable the Agentless flag.
- If multiple nstances of Confluence are operating on a single node, and you want to BTM-enable all the instances, then you will have to manage each instance as a separate component using the eG administrative interface. When doing so, make a note of the Nick name and Port number using which you managed each instance.
- Next, log out of the eG admin interface. Then, create a btm directory anywhere on the system hosting Confluence - say, C:\btm (if the target node is operating on a Windows system), or /opt/btm (if the target node is operating on a Unix system). Under this directory, create a sub-folder. Make sure that you name this sub-folder in the following format: <Managed_Component_NickName>_<Managed_Component_Port>. For instance, if you have managed Confluence using the nick name Confluence1 and the port number 8090, the new directory under the btm directory should be named as Confluence1_8090.
-
If you have managed multiple Confluence instances running on a single node, then you will have to create multiple sub-directories under the btm directory- one each for every instance. Each of these sub-directories should be named after the Nick name and Port number using which the corresponding instance has been managed in eG.
- Once the new sub-directory(ies) is created, open a browser on the system hosting Confluence, connect to the eG manager, and login to the eG admin interface again.
- Follow the Agents -> BTM Profiler Settings menu sequence in the eG admin interface.
-
Figure 5 will appear listing the servers that can be instrumented for APM by eG. In this list, locate the Atlassian Confluence component you want to BTM-enable. Once you locate component, click the Download icon corresponding to that node to download the APM Profiler Agent to that node. If multiple JVM instances on a single node are managed, then you will have to download the APM Profiler Agent separately for each of the managed instances.
Figure 5 : Downloading the APM Profiler Agent for Atlassian Confluence
- Upon clicking the Download icon in Figure 5, a zip file named javaagent_<Nick_name_of_JVM_node>_<Port_number_of_JVM_node will get downloaded. For instance, if you have managed Confluence using the nickname 'Confluence1' and the port number '8090', then the name of the zip file will be javaagent_Confluence1_8090. Where multiple Confluence instances have been managed, you will be downloading multiple zip files - one each for every instance. The names of these zip files will automatically carry the nick name and port number you assigned to the corresponding instance.
- Copy the downloaded zip file(s) to the corresponding sub-directory(ies) of the btm directory (see step 6 above). For example, the zip file named javaagent_Confluence1_8090, should be copied to the C:\btm\Confluence1_8090 directory (on Windows) or /opt/btm/Confluence1_8090 (on Unix).
- Extract the contents of each zip file into the same sub-directory to which that zip file was copied.
-
Figure 6 depicts the extracted contents of the zip file.
- From Figure 6, it is evident that the zip file contains an eg_btm.jar file and a few property files, namely - btmOther.props, btmLogging.props, config.props, custom.props, exclude.props, and threshold.props files.
-
Next, proceed to BTM-enable the Confluence server/instance. For that, first open the catalina.bat file (on a Windows installation of Confluence; on Unix, this will be the catalina.sh file) in the <ATLASSIAN_INSTALL_DIR>\confluence\bin directory (on Windows; on Unix, this will be /opt/atlassian/confluence/bin).
-
If you have the catalina.bat file open, then look for the entry that begins with set "JAVA_OPTS= entry in it. Against that entry, specify the following:
set "JAVA_OPTS=%JAVA_OPTS% -javaagent:<<PATH TO THE EG_BTM.JAR FILE>>"
For instance, if the eg_btm.jar file had been copied to the C:\btm\Confluence1_8090 directory, the above specification will be:
set "JAVA_OPTS=%JAVA_OPTS% -javaagent:C:\Confluence1_8090/eg_btm.jar
On the other hand, if the target Confluence server is running on a Unix system and you have the catalina.sh file open, look for the entry that begins with JAVA_OPTS= in that file. Against that entry, specify the following
JAVA_OPTS="$JAVA_OPTS -javaagent:<<PATH TO THE eg_btm.jar>>"
For instance, if the eg_btm.jar had been copied to the /opt/btm/Confluence1_8090 directory on the Confluence server, then your specification will be as follows:
JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/btm/Confluence1_8090/eg_btm.jar"
-
Next, add the package com.eg in the boot delegation framework. For this, you need to add an entry to this effect in the catalina.bat file (or the catalina.sh file, as the case may be). Figure 3 depicts how this can be done in the catalina.bat file, and Figure 4 depicts how this can be achieved in the catalina.sh file.
- Then, save the file.
-
Finally, restart the Confluence server. For this, first go to the command prompt and switch to the <<ATLASSIAN_CONFLUENCE_HOME>>\confluence\bin directory (on Windows; on Unix, go to the /opt/atlassian/confluence/bin directory). Then, run the following command at the Windows prompt:
Start-confluence.bat /fg
On the Unix shell prompt on the other hand, run the following command:
Start-confluence.sh /fg
-
Where multiple Confluence server instances on a host are to be monitored, repeat steps 7 to 19 for each of the server instances.