How to enable New Relic RUM on Confluence

I want to use New Relic on Confluence to get user statistics. However, I don't know how to enable Real User Monitoring (RUM).

Auto instrumentation didn't work, so I tried a manual installation. To enable Confluence to use the Java Agent API I copied the newrelic-api.jar to my confluence/WEB-INF/lib folder.

According to the New Relic documentation I have to add some HTML-code to Confluence, but where should I do this?

I'm using Confluence 4.2.1 running on a Ubuntu server.


Michiel

4 answers

1 accepted

This widget could not be displayed.

I also contacted New Relic for this problem.
RUM is currently not supported for Confluence pages. Maybe they will develop a plugin to add RUM-tags.
You can use New Relic only for server monitoring to get data about CPU usage, phsyical memory, etc.

This widget could not be displayed.

Here is a simple instruction howto add NewRelic Real User Monitoring to Confluence.

  1. Download NewRelic agent lib: newrelic_agent3.3.2.zip
  2. Unzip it to confluence/install dir
  3. add line(change <FULL_PATH> to real path) to file confluence/install/bin/catalina.sh
    export JAVA_OPTS="$JAVA_OPTS -javaagent:&lt;FULL_PATH&gt;/confluence/install/newrelic/newrelic.jar"

  4. Change NewRelic configuration file newrelic.yml:
    1. Insert your license_key:
      license_key: &lt;key&gt;
    2. Change app name:
      app_name: &lt;app_name&gt;
    3. Disable Real User Monitoring auto instrumentation:
      browser_monitoring:
        auto_instrument: false
  5. Restart Confluence
  6. Create a plugin in order to add $NewRelic to Confluence velocity context:
    1. Create atlassian-plugin.xml:
      &lt;atlassian-plugin name="NewRelic" key="confluence.new.relic"&gt;
      &lt;plugin-info&gt;
          &lt;description&gt;
            Plugin to add NewRelic RUM.
          &lt;/description&gt;
          &lt;!-- This version is displayed in the application's Plugin Manager. --&gt;
          &lt;version&gt;1.0&lt;/version&gt;
        &lt;/plugin-info&gt;
          &lt;velocity-context-item key="NewRelic"
                name="NewRelic" context-key="NewRelic"
                class="com.newrelic.api.agent.NewRelic" /&gt;
      &lt;/atlassian-plugin&gt;
    2. Name xml above as "atlassian-plugin.xml"
    3. zip (the only file) it into .jar file (for example newrelic.jar) and install it as a usual plugin using Confluense Admin->Plugins
  7. Add NewRelic to confluence templates:
    1. go to confluence/install/confluence/decorators/includes
    2. In header.vm after meta tags add lines:
      #set($relicWithHtml = $NewRelic.getBrowserTimingHeader())
      $relicWithHtml

    3. In footer.vm add lines
      #set($relicFooterWithHtml = $NewRelic.getBrowserTimingFooter())
      $relicFooterWithHtml

  8. Cear confluence Pages cache: Admin->Cache Statistics: Pages flush
  9. Done

I am wondering how is possible to obtain the same via a plugin, so it would not need to touch the Confluence files.

@Sorin Sbarnea (Citrix) You could try New Relic for Atlassian Confluence -- https://www.appfusions.com/display/NEWRELICCONF/Home -- from AppFusions

@Marcin Mierzejewski Thank you. I follow your instructions, and it works on my first try.  I am using Confluence 5.7, running on Red Hat 6.7, MySQL 5.5.

This widget could not be displayed.

AppFusions has a New Relic for Atlassian Confluence add-on which makes this setup and configuration much easier.

@David Simpson v4.0, i tried to upload the above plugin to Confluence v5.9.7, i am getting error in UI

"An error occurred during installation. Refer to the logs for more information."

and in logs:

2016-03-30 11:20:16,074 WARN [UpmAsynchronousTaskManager:thread-4] [upm.core.install.DefaultPluginInstallationService] execute Plugin installation failed: Failed to resolve plugin dependencies within OBR [plugin_319211194046483372_newrelic-conf-1.0.0.obr]. Please see the logs for more detailed information.
-- url: /rest/plugins/1.0/ | referer: https://confluence.xxxxxxx.net/plugins/servlet/upm | userName: xxxxx

Can you please check and update the plugin and help me to resolve this issue.

thanks

 

This widget could not be displayed.

Hi all,

We can add NewRelic script directly to the header.vm and footer.vm. Why we are injecting NewRelic script through plugin ?

Is there anything need to consider while pasting New Relic script directly to the velocity template?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

470 views 6 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you