Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

Newrelic APM- Install and Configure using Tomcat & Java Agent Tutorials

Step 1 – Install JDK

Step 2 – Install & Start Tomcat

Step 3 – Install your apps

Lets use Tomcat’s default example app only. You may have permission issues for accessing http://18.210.16.76:8080/examples/ which can be fixed by following commands below

$ cd /opt/apache-tomcat-9.0.82/webapps/examples
$ find . -name context.xml
$ vi ./META-INF/context.xml

Step 4 – Install NewRelic Infra Agent & APM Agent

NewRelic Infra Agent would detect the Tomcat and Java automatically and try to configure APM Java Agent as per the image as below;





root@ip-172-31-58-86:/etc/newrelic-infra/integrations.d# ls
docker-config.yml  java-dynamic-attach.yml

root@ip-172-31-58-86:/etc/newrelic-infra/integrations.d# more java-dynamic-attach.yml
integrations:
  - name: java-dynamic-attach
    exec: ./dynamic-attach.sh
    working_dir: /etc/newrelic-java
    interval: 60s
    timeout: 1200s
    integration_user: root

root@ip-172-31-58-86:/etc/newrelic-infra/integrations.d#
Code language: PHP (php)

Step 5 -(Manual) Install NewRelic APM Java Agent



Alternative

curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash && sudo NEW_RELIC_API_KEY=NRAK-32EHABRB7444 NEW_RELIC_ACCOUNT_ID=3404444 /usr/local/bin/newrelic install -n java-agent-installerCode language: JavaScript (javascript)


Manual way to set Newrelic APM Agent in Tomcat


$ cd /opt
$ curl -O https://download.newrelic.com/newrelic/java-agent/newrelic-agent/current/newrelic-java.zip
$ unzip newrelic-java.zip
$ cd newrelic
$ mv newrelic.yml newrelic.yml-bkp
$ vi newrelic.yml # COPY PASTE from Download newrelic.yml
$ chmod -R 755 .
$ cd /opt/
$ cd apache-tomcat-9.0.73
$ cd bin
$ vi setenv.sh
export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/opt/newrelic/newrelic.jar"
$ ./shutdown.sh
$ ./startup.sh
$ ps -eaf | grep newrelic.jarCode language: PHP (php)

The CATALINA_OPTS environment variable is used to set Java options for the Tomcat server. The option -javaagent:/opt/newrelic/newrelic/newrelic.jar is used to load the New Relic Java agent, which enables monitoring of your Tomcat application using New Relic APM.

If you are looking for other options to set in CATALINA_OPTS to configure the New Relic Java agent, some common options include:

  • -Dnewrelic.config.file=<path to newrelic.yml>: This option can be used to specify the path to the New Relic configuration file, which contains settings such as application name, license key, and logging configuration.
  • -Dnewrelic.environment=<environment name>: This option can be used to specify the name of the environment in which your application is running, such as “production” or “staging”.
  • -Dnewrelic.appname=<application name>: This option can be used to specify the name of your application as it will appear in the New Relic APM dashboard.
  • -Dnewrelic.verbose=true: This option can be used to enable verbose logging for the New Relic Java agent.
  • -Dnewrelic.config.log_file_path=<path to log file>: This option can be used to specify the path to the New Relic log file.

Step 6 – Access the apps

You may create a Traffic on App using Jmeter as below;

Step 7 – Verify a APM apps on NewRelic Dashboard

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
Iโ€™m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

Best Tools for Software Composition Analysis (SCA)

Hereโ€™s a clear and professional explanation of the three related concepts you asked about โ€” all of which are critical parts of secure software development, especially in…

Read More

Top 10 AI Code Review Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI code review tools have become essential for developers aiming to enhance code quality, streamline workflows, and accelerate software delivery. These tools leverage advanced…

Read More

Top 10 Expense Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction Expense management tools are critical for businesses of all sizes in 2026 as they help streamline financial processes, improve budgeting, ensure compliance, and enhance financial visibility….

Read More

Top 10 Web Application Firewall (WAF) Tools in 2026: Features, Pros, Cons & Comparison

Introduction In the rapidly evolving landscape of cybersecurity, Web Application Firewalls (WAFs) have become a critical component in defending web applications from malicious attacks such as SQL…

Read More

Top 10 Endpoint Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, businesses of all sizes are increasingly reliant on a variety of devicesโ€”laptops, desktops, mobile devices, and other endpointsโ€”that connect to their networks. With the…

Read More

Top 11 Best Apps for Education

Are you tired of traditional learning methods? Do you want to explore new ways of learning? Then you have come to the right place! In this article,…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x