Applying an Atlassian Plugin to RUM-Enable Confluence

If, for some reason, the RUM code snippet cannot be directly inserted into the Velocity template file, then, use the broad steps outlined below to RUM-enable Atlassian Confluence:

  1. Download the egrum.jar and include it in the classpath of Atlassian Confluence.
  2. Upload the specialized plugin for Atlassian that eG Enterprise provides. This plugin includes a reference key/pointer to the egrum.jar .
  3. Edit the Velocity template file, so that this reference key/pointer can be added to the Confluence velocity context. Once this is done, the Velocity template file will reference the egrum.jar using the key in the Atlassian plugin, dynamically generate the RUM script, and inject the script into the HTML pages.

The detailed procedure is provided below:

  1. First, download the egrum.jar file to system hosting Atlassian Confluence. For this, login to the Confluence host. Then, connect to the eG manager using a browser, and login to the eG administrative interface. Next, add the Confluence site to be monitored as a Real User Monitor component (Infrastructure -> Components -> Add/Modify).
  2. Once the component is added, click the egrum.jar link in Figure 6 that appears, to download the jar file to any location on the local host.

    Figure 6 : Downloading the egrum.jar file

  3. Then, copy the egrum.jar to the <CONFLUENCE_INSTALL_DIR>\Atlassian\Confluence\lib directory.
  4. Next, open the catalina.bat file in the <CONFLUENCE_INSTALL_DIR>\Atlassian\Confluence\bin directory, using an editor.
  5. Look for the following code block in the file:

    %_EXECJAVA% -classpath "%CATALINA_HOME%\lib\catalina.jar" org.apache.catalina.util.ServerInfo

  6. To add the egrum.jar to the classpath, you need to replace the above code block with the following:

    %_EXECJAVA% -classpath "%CATALINA_HOME%\lib\catalina.jar" "%CATALINA_HOME%\lib\egrum.jar" org.apache.catalina.util.ServerInfo

  7. Save the file, and then restart Atlassian Confluence.
  8. Next, proceed to upload the Atlassian plugin that has been bundled into the eG manager to Confluence, as an add-on. For this, first, login to Atlassian Confluence. When Figure 7 appears, click on the Confluence logo at the left, top corner of the window to view the toolbar. Then, click on the Gear icon on the toolbar and pick the Add-ons option.

    Figure 7 : Selecting the Add-ons option

  9. Figure 8 then appears. Click on the Upload add-on link in Figure 8.

    Figure 8 : Clicking on the Upload add-on link

  10. Figure 9 will then appear. Click the Choose File button therein to browse for the add-on named, egrum-atlassian-plugin.jar, and specify its location. This add-on will be available in the <EG_MANAGER_INSTALL_DIR>\lib\rum directory.

    Figure 9 : Uploading the add-on

  11. Click the Upload button in Figure 9 to upload the add-on.
  12. Once the upload is successful, Figure 10 will appear informing you of the successful upload.

    Figure 10 : A message box confirming the successful upload

  13. Click the Close button in Figure 10 and log out of Confluence.
  14. Next, proceed to edit the Velocity template file. For that, open the <CONFLUENCE_INSTALL_DIR>\Atlassian\Confluence\confluence\decorators\includes\header.vm file in an editor.
  15. Insert the following line in the header.vm file, after the meta tags, as indicated below:

    #set($eGRumScriptAsHtml = $eGRum.getHeader())$eGRumScriptAsHtml

  16. Save the file.
  17. Next, proceed to flush all page caches. For this, first, login to Atlassian Confluence.
  18. When Figure 11 appears, click on the Confluence logo at the left, top corner of the window to view the toolbar. Then, click on the Gear icon on the toolbar and pick the General configuration option.

    Figure 11 : Selecting the General Configuration option

  19. When Figure 12 appears, click on the Cache Management option in the left panel.

    Figure 12 : Clicking on the Cache Management option

  20. Then, click on the Show advanced view option in the Cache Statistics page that appears in the right panel (see Figure 13).

    Figure 13 : Clicking on the Show advanced view link

  21. To flush the page caches, click the Flush links that correspond to all page-related caches (see Figure 14).

    Figure 14 : Flushing all page-related caches