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

Top 10 Disk Partition Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, disk partitioning is crucial for maintaining an efficient and organized storage system. Disk partition tools are essential for creating, resizing, merging, splitting, and managing…

Read More

Top 10 Backup & Recovery Tools in 2026: Features, Pros, Cons & Comparison

Introduction In todayโ€™s digital world, data is the backbone of virtually every business operation. As the amount of critical data grows, so does the need for robust…

Read More

Top 10 Barcode Generation Tools in 2026: Features, Pros, Cons & Comparison

Introduction Barcode generation tools are essential for modern business operations. They allow businesses to create scannable codes that represent information such as product IDs, prices, or inventory…

Read More

Top 10 Cloud Backup Tools in 2026: Features, Pros, Cons & Comparison

Introduction Cloud backup tools are indispensable in 2026 for businesses and individuals seeking to safeguard their data in an increasingly digital world. These tools provide remote, secure…

Read More

Top 10 Data Recovery Tools in 2026: Features, Pros, Cons & Comparison

Introduction In todayโ€™s digital world, data is one of the most valuable assets for businesses and individuals alike. Whether youโ€™re dealing with business-critical files or personal memories,…

Read More

Top 10 Data Replication Tools in 2026: Features, Pros, Cons & Comparison

Introduction Data replication refers to the process of copying data from one location to another to ensure consistency and availability across multiple systems. As businesses increasingly rely…

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