April 19, 2020
Estimated Post Reading Time ~

Monitoring AEM with New Relic

I love New Relic. Their server monitoring tools allow me to remotely monitor my various servers and development applications for free and their stuff just works. Recently, we were running into an issue at Six Dimensions where a couple of our development servers were toppling over and without any real monitoring in place we couldn't tell why. To address this, we've been rolling out New Relic on all of our development servers.

As part of this, I was curious about setting up monitoring of Adobe CQ / AEM with New Relic. Out of the box, New Relic supports a number of application servers, however AEM is not one of them. Luckly, I found a pretty simple guide to setting up monitoring generic Java applications. Here are the instructions for setting up basic montioring for AEM in New Relic:

Step 1 - First login to New Relic, go to the Applications page and click Add more

Step 2 - Next, ensure Java is selected from the language dropdown and click Reveal your license key

Example reports for AEM generated by New Relic

Step 3 - Upload the zip to your server and put it inside the CQ installation folder

Step 4 - Unzip the archive and edit the file newrelic/newrelic.yaml, setting the property app_name to an appropriate value. The app_name should contain the client/application name, environment and instance type, ex: Client DEV Author

Step 5 - Edit the CQ start script at crx-quickstart/bin/start[.bat], add the value -javaagent:[CQ_ROOT]/newrelic/newrelic.jar to the default JVM options, ex: 

# default JVM options
if [ -z "$CQ_JVM_OPTS" ]; then
     CQ_JVM_OPTS='-server -Xmx2048m -XX:MaxPermSize=1024M -Djava.awt.headless=true -javaagent:/opt/aem/author/newrelic/newrelic.jar'
fi

Step 6 - Restart CQ and wait for a few minutes for the application to appear in the New Relic console.

Once monitoring is started you should be able to leverage the reports provided by New Relic to monitor and diagnose your CQ instances.

Example reports for AEM generated by New Relic


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.