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 running on Windows, and the eG agent monitoring the server has been deployed on that server itself, then follow the steps below to BTM-enable the Confluence server:

  1. Manage Atlassian Confluence using the eG administrative interface. When managing, make a note of the Nick name and Port number that you provide.
  2. If multiple Confluence server instances are operating on a single host, and you want to BTM-enable all the instances, then you will have to manage each instance as a separate Atlassian Confluence server using the eG administrative interface. When doing so, make a note of the Nick name and Port number using which you managed each instance.
  3. In the <eg_agent_install_dir>\lib\btm directory, you will find the following files:

    • eg_btm.jar
    • btmLogging.props
    • btmOther.props
    • exclude.props
  4. Next, create a new directory under the <eg_agent_install_dir>\lib\btm. Take care to name this directory in the following format: <Managed_Component_NickName>_<Managed_Component_Port>. For instance, if you have managed the Confluence server using the nick name Conflu1 and the port number 8090, the new directory under the btm directory should be named as Conflu1_8090.
  5. If you have managed multiple Confluence server instances running on a single host, 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.
  6. Once the new directory is created, copy the following files from the btm directory to the new directory. If multiple directories have been created as described by step 5 above, then the files should be copied to each of those directories:

    • btmLogging.props
    • btmOther.props
    • exclude.props
    • Next, edit the btmOther.props file. You will find the following lines in the file:

      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      # Below property is BTM Server Socket Port, through which eG Agent Communicates

      # Restart is required, if any changes in this property

      # Default port is "13931"

      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      #

      BTM_Port=13931

      #

      By default, the BtmPort parameter is set to 13931. If you want to enable eG Java BTM on a different port, then specify the same here. In this case, when configuring theJava Business Transactions test or the Key Java Business Transactions test for the Confluence server, make sure you configure the btm port parameter of the test with this port number.

      Note:

      When BTM-enabling multiple instances on the same server, make sure you configure a different BTM Port for each instance.

      Also, by default, the Designated_Agent parameter will be empty; do not disturb this default setting. In this case therefore, the eG Java BTM will treat the host from which the very first 'measure request' comes in as the Designated_Agent

      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      # Below property is used to specify IP address of eG Agent which collectes BTM Data.

      # Default is None

      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      #

      Designated_Agent=

      #

       

      Note:

       

      In case a specific Designated_Agent is not provided, and the eG Java BTM treats the host from which the very first 'measure request' comes in as the Designated_Agent, then if such a Designated_Agent is stopped or uninstalled for any reason, the eG Java BTM will wait for a maximum of 10 measure periods for that 'deemed' Designated_Agent to request for metrics. If no requests come in for 10 consecutive measure periods, then the eG Java BTM will begin responding to 'measure requests' coming in from any other eG agent.

  7. Then, you need to configure the Confluence server with the path to the eg_btm.jar and .props files. For this, first open the catalina.bat file in the <<ATLASSIAN_HOME>>\confluence\bin directory .
  8. Then, in that file, look for the entry that begins with set "JAVA_OPTS=
  9. Against that entry, specify the following:

    set "JAVA_OPTS=%JAVA_OPTS% -javaagent:<<EG_INSTALL_DIR>>\lib\btm\eg_btm.jar -DEG_PROPS_HOME=<<PATH OF THE LOCAL FOLDER CONTAINING THE .PROPS FILES>>"

  10. For instance, if the .props files had been copied to the <EG_AGENT_INSTALL_DIR>\lib\btm\conflu1_8090 directory, the above specification will be:

    set "JAVA_OPTS=%JAVA_OPTS% -javaagent:<<EG_INSTALL_DIR>>\lib\btm\eg_btm.jar -DEG_PROPS_HOME=<EG_AGENT_INSTALL_DIR>\lib\btm\conflu1_8090"

  11. 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. Figure 1 depicts how this can be done.

    Figure 1 : Adding the com.eg package in the boot delegation framework

  1. Then, save the file.
  2. Finally, restart the Confluence server. For this, first go to the command prompt and switch to the <<ATLASSIAN_CONFLUENCE_HOME>>\confluence\bin directory. Then, run the following command at the prompt:

    Start-confluence.bat /fg

  3. Where multiple Confluence server instances on a host are to be monitored, Repeat 7 to 12 for each of the server instances.

If a Confluence server is running on Unix, and the eG agent monitoring the server has been deployed on that server itself, then follow the steps below to BTM-enable that server:

  1. Manage the Confluence server using the eG administrative interface. When managing, make a note of the Nick name and Port number that you provide.
  2. If multiple Confluence server instances are operating on a single host, and you want to BTM-enable all the instances, then you will have to manage each instance as a separate Atlassian Confluence server using the eG administrative interface. When doing so, make a note of the Nick name and Port number using which you managed each instance.
  3. In the /opt/egurkha/lib/btm directory, you will find the following files:

    • eg_btm.jar
    • btmLogging.props
    • btmOther.props
    • exclude.props
  4. Next, create a new directory under the /opt/egurkha/lib/btm. Take care to name this directory in the following format: <Managed_Component_NickName>_<Managed_Component_Port>. For instance, if you have managed the Confluence server using the nick name Conflu and the port number 8090, the new directory under the btm directory should be named as Conflu_8090.
  5. If you have managed multiple Confluence server instances running on a single host, 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.
  6. Once the new directory is created, copy the following files from the btm directory to the new directory. If multiple directories have been created as described in step 5 above, then the following files should be copied to all directories:

    • btmLogging.props
    • btmOther.props
    • exclude.props
  7. Next, edit the btmOther.props file. You will find the following lines in the file:

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Below property is BTM Server Socket Port, through which eG Agent Communicates

    # Restart is required, if any changes in this property

    # Default port is "13931"

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    #

    BTM_Port=13931

    #

    By default, the BtmPort parameter is set to 13931. If you want to enable eG Java BTM on a different port, then specify the same here. In this case, when configuring theJava Business Transactions test or the Key Java Business Transactions test for that Confluence server, make sure you configure the btm port parameter of the test with this port number.

    Note:

    When BTM-enabling multiple instances on the same server, make sure you configure a different BTM Port for each instance.

    Also, by default, the Designated_Agent parameter will be empty; do not disturb this default setting. In this case therefore, the eG Java BTM will treat the host from which the very first 'measure request' comes in as the Designated_Agent.   

     

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Below property is used to specify IP address of eG Agent which collectes BTM Data.

    # Default is None

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    #

    Designated_Agent=

    #

     

    Note:

    In case a specific Designated_Agent is not provided, and the eG Java BTM treats the host from which the very first 'measure request' comes in as the Designated_Agent, then if such a Designated_Agent is stopped or uninstalled for any reason, the eG Java BTM will wait for a maximum of 10 measure periods for that 'deemed' Designated_Agent to request for metrics. If no requests come in for 10 consecutive measure periods, then the eG Java BTM will begin responding to 'measure requests' coming in from any other eG agent.

  8. Then, you need to configure the Confluence server with the path to the eg_btm.jar and .props files. For this, first open the catalina.sh file in the opt/atlassian/confluence/bin directory.
  9. Next, look for the JAVA_OPTS= entry in the file. Under this entry, insert the following lines to BTM-enable the server.

    JAVA_OPTS="$JAVA_OPTS -javaagent:<<Full_path_to_the_eg_btm.jar_file>> -DEG_PROPS_HOME=<<Path_to_the_.props_file>>

    For instance, if the .props file had been copied to the Conflu_8090 folder within the /opt/egurkha/lib/btm folder, then your specification will be as follows:

    JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/egurkha/lib/btm/eg_btm.jar -DEG_PROPS_HOME=/opt/egurkha/lib/btm/Conflu_8090

     

    Figure 2 : Editing the catalina.sh file of a Confluence server on Linux to BTM-enable the server

  1. Finally, save the file.
  2. 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.sh file. Figure 3 depicts how this can be done.

    Figure 3 : Adding the com.eg package in the boot delegation framework

  3. Then, save the file.
  4. Finally, restart the Confluence server. For this, first go to the command prompt and switch to the /opt/atlassian/confluence/bin directory. Then, run the following command at the prompt:

    Start-confluence.sh /fg

  5. Where multiple Confluence server instances on a host are to be monitored, Repeat 7 to 13 for each of the server instances.

Agentless Approach to Deploying eG Java BTM on an Atlassian Confluence Server

If Atlassian Confluence is running on Windows, and the eG agent monitoring the server has been deployed on a remote host in the environment, then follow the steps below to BTM-enable that Confluence server:

  1. Manage the Atlassian Confluence server as a separate component using the eG administrative interface. When managing, make a note of the Nick name and Port number that you provide.
  2. If multiple Confluence instances are operating on a single node, and you want to monitor each of those instances, then you will have to manage each instance as a separate Atlassian Confluence server using the eG administrative interface. When doing so, make a note of the Nick name and Port number using which you managed each instance.
  3. In the <eg_agent_install_dir>\lib\btm directory on the eG agent host, you will find the following files:

    • eg_btm.jar
    • btmLogging.props
    • btmOther.props
    • exclude.props
  4. Next, log into the Confluence server that is being monitored.
  5. Create a new directory named, say btm, in any location on that server.
  6. Under this directory, create a sub-directory. Take care to name this directory in the following format: <Managed_Component_NickName>_<Managed_Component_Port>. For instance, if you have managed the Confluence server using the nick name conflu1 and the port number 8090, the sub-directory should be named as conflu1_8090.
  7. If you have managed multiple instances of the Confluence server, then you will have to create multiple sub-directories - 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.
  8. Once the new sub-directory is created, copy all the files from the btm directory of the remote agent to the sub-directory on the Confluence server. Where multiple sub-directories have been created, you will have to copy the files to each of those directories.

  9. Next, edit the btmOther.props file. You will find the following lines in the file:

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Below property is BTM Server Socket Port, through which eG Agent Communicates

    # Restart is required, if any changes in this property

    # Default port is "13931"

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    #

    BTM_Port=13931

    #

  10. By default, the Btm_Port parameter is set to 13931. If you want to enable eG Java BTM on a different port, then specify the same here. In this case, when configuring theJava Business Transactions test or the Key Java Business Transactions test for the Confluence server, make sure you configure the btm port parameter of the test with this port number.

    Note:

    When BTM-enabling multiple instances on the same server, make sure you configure a different BTM Port for each instance.

    Also, by default, the Designated_Agent parameter will be empty; do not disturb this default setting. In this case therefore, the eG Java BTM will treat the host from which the very first 'measure request' comes in as the Designated_Agent.   

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Below property is used to specify IP address of eG Agent which collectes BTM Data.

    # Default is None

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    #

    Designated_Agent=

    #

     

    Note:

    In case a specific Designated_Agent is not provided, and the eG Java BTM treats the host from which the very first 'measure request' comes in as the Designated_Agent, then if such a Designated_Agent is stopped or uninstalled for any reason, the eG Java BTM will wait for a maximum of 10 measure periods for that 'deemed' Designated_Agent to request for metrics. If no requests come in for 10 consecutive measure periods, then the eG Java BTM will begin responding to 'measure requests' coming in from any other eG agent.

  11. Finally, save the btmOther.props file.

  12. Then, you need to configure the Confluence server with the path to the eg_btm.jar and .props files. For this, first open the catalina.bat file in the <<ATLASSIAN_HOME>>\confluence\bin directory .
  13. Then, in that file, look for the entry that begins with set "JAVA_OPTS=
  14. Against that entry, specify the following:

    set "JAVA_OPTS=%JAVA_OPTS% -javaagent:<<PATH TO THE EG_BTM.JAR FILE>> -DEG_PROPS_HOME=<<PATH OF THE LOCAL FOLDER CONTAINING THE .PROPS FILE>>"

     

    For instance, if the .props files had been copied to the E:\btm\conflu1_8090 directory, the above specification will be:

  15. set "JAVA_OPTS=%JAVA_OPTS% -javaagent:E:\btm\conflu1_8090\eg_btm.jar -DEG_PROPS_HOME=E:\btm\conflu1_8090"

  16. 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. Figure 4 depicts how this can be done.

    Figure 4 : Adding the com.eg package in the boot delegation framework

  1. Then, save the file.
  2. Finally, restart the Confluence server. For this, first go to the command prompt and switch to the <<ATLASSIAN_CONFLUENCE_HOME>>\confluence\bin directory. Then, run the following command at the prompt:

    Start-confluence.bat /fg

  3. Where multiple Confluence server instances on a host are to be monitored, Repeat 7 to 17 for each of the server instances.

If an Atlassian Confluence server is running on Unix, and the eG agent monitoring the server has been deployed on a remote host in the environment, then follow the steps below to BTM-enable that Confluence server:

  1. Manage the Atlassian Confluence server using the eG administrative interface. When managing, make a note of the Nick name and Port number that you provide.
  2. If multiple Confluence server instances are operating on a single host, and you want to BTM-enable all the instances, then you will have to manage each instance as a separate Atlassian Confluence server using the eG administrative interface. When doing so, make a note of the Nick name and Port number using which you managed each instance.
  3. In the <eg_agent_install_dir>\lib\btm directory on the eG agent host, you will find the following files:

    • eg_btm.jar
    • btmLogging.props
    • btmOther.props
    • exclude.props
  4. Next, log into the Confluence server that is being monitored.
  5. Create a new directory named, say btm, in any location on that server.
  6. Under this directory, create a sub-directory. Take care to name this directory in the following format: <Managed_Component_NickName>_<Managed_Component_Port>. For instance, if you have managed the Confluence server using the nick name Conflu1 and the port number 8090, the sub-directory should be named as Conflu1_8090.
  7. If you have managed multiple instances of the Confluence server, then you will have to create multiple sub-directories - 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.
  8. Once the new sub-directory is created, copy all the files from the btm directory of the remote agent to the sub-directory on the Confluence server. Where multiple sub-directories have been created, you will have to copy the files to each of those directories.
  9. Next, edit the btmOther.props file. You will find the following lines in the file:

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Below property is BTM Server Socket Port, through which eG Agent Communicates

    # Restart is required, if any changes in this property

    # Default port is "13931"

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    #

    BTM_Port=13931

    #

     

    By default, the Btm_Port parameter is set to 13931. If you want to enable eG Java BTM on a different port, then specify the same here. In this case, when configuring theJava Business Transactions test or the Key Java Business Transactions test for the Confluence server, make sure you configure the btm port parameter of the test with this port number.  

    Note:

    When BTM-enabling multiple instances on the same server, make sure you configure a different BTM Port for each instance.

  1. Also, by default, the Designated_Agent parameter will be empty; do not disturb this default setting. In this case therefore, the eG Java BTM will treat the host from which the very first 'measure request' comes in as the Designated_Agent.   

     

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    # Below property is used to specify IP address of eG Agent which collectes BTM Data.

    # Default is None

    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    #

    Designated_Agent=

    #

     

    Note:

    In case a specific Designated_Agent is not provided, and the eG Java BTM treats the host from which the very first 'measure request' comes in as the Designated_Agent, then if such a Designated_Agent is stopped or uninstalled for any reason, the eG Java BTM will wait for a maximum of 10 measure periods for that 'deemed' Designated_Agent to request for metrics. If no requests come in for 10 consecutive measure periods, then the eG Java BTM will begin responding to 'measure requests' coming in from any other eG agent.

  1. Finally, save the btmOther.props file.
  2. Then, proceed to configure the Confluence server with the path to the eg_btm.jar and .props files. For this, first open the catalina.sh file in the /opt/atlassian/confluence/bin directory.
  3. Look for the JAVA_OPTS= entry in the file.
  4. Once the entry is found, insert the following lines under that entry, as depicted by .

    JAVA_OPTS="$JAVA_OPTS -javaagent:<<PATH TO THE eg_btm.jar>> -DEG_PROPS_HOME=<<PATH TO THE LOCAL FOLDER CONTAINING THE .PROPS FILE>>"

    For instance, if the eg_btm.jar and .props files were copied to the /opt/btm/Conflu1_8090 directory on the Confluence server, then your specification will be as follows (see Figure 5):

    JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/btm/Conflu1_8090/eg_btm.jar -DEG_PROPS_HOME=/opt/btm/Conflu1_8090"

     

    Figure 5 : Editing the catalina.sh file to BTM-enable Confluence

  5. 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.sh file. Figure 6 depicts how this can be done.

    Figure 6 : Adding the com.eg package in the boot delegation framework

  6. Then, save the file.
  7. Finally, restart the Confluence server. For this, first go to the command prompt and switch to the /opt/atlassian/confluence/bin directory. Then, run the following command at the prompt:

    Start-confluence.bat /fg

  8. Where multiple Confluence server instances on a host are to be monitored, Repeat 7 to 17 for each of the server instances.