Pages

Thursday, 8 November 2012

New Relic Agent in JBoss AS7

New Relic is a company with a hot new cloud based performance and monitoring service.
Without having performed a deeper evaluation, I must still say that it looks quite impressive and has a clean and very nice UI.
As you sign up for their service you get to download a zip with the New Relic Agent. For a Java-environment, it contains e g some JARs, configuration files and a README.txt explaining how to run the bundled installer.
If you're running JBoss AS7 you are currently (this will certainly be amended) a bit on your own though. But don't despair (or wait in wain)! The solution is quite simple. Just follow steps below and and you're up and monitoring your apps in no time.

Note: This has successfully been tested using JBoss AS7.1.2.Final on OSX 10.8.2 with Java SE 1.6.0_37.

1. create the directory structure
$JBOSS_HOME/module/com/newrelic/agent/main
where JBOSS_HOME is the root install directory of your JBoss AS7 distribution. 

2. add a file named module.xml with the following content to the directory main from 1.
<?xml version="1.0" encoding="UTF-8">
<module xmlns="urn:jboss:module:1.0" name="com.newrelic.agent">
  <resources>
    <resource-root path="newrelic.jar"/>
    <!-- Insert resources here -->
  </resources>
</module>

3. from the downloaded zip, copy the file newrelic.jar to the directory main from 1.
This is the New Relic Agent.

4. from the downloaded zip, copy the file newrelic.yml to the directory main from 1.
This is the base configuration for the New Relic Agent.

5. add the following lines th the JBoss AS startup script (e g) $JBOSS_HOME/bin/standalone.sh

JBOSS_MODULES_SYSTEM_PKGS="$JBOSS_MODULES_SYSTEM_PKGS,com.newrelic.agent"
JAVA_OPTS="$JAVA_OPTS -javaagent:<path>/newrelic.jar"
Make sure to change the <path> to where the newrelic.jar is located - it should be in the directory in 1.


6. start JBoss AS with (in the simplest form) e g
$JBOSS_HOME/bin/standalone.sh

7. deploy you app (ear/war etc) to JBoss AS7

8. Look at https://rpm.newrelic.com/ how your app is discovered - it might take a few minutes - and then how it behaves. Configure, monitor, set alerts & notifications, etc.

Nice!

7 comments:

  1. Lots of information and benefits that I can take from your writing.
    I hope that in the future it will get even better and better, so that everyone can get a lot of information here.

    Visit the best Website health and information

    Lots of information and benefits that I can take from your writing.
    I hope that in the future it will get even better and better, so that everyone can get a lot of information here.

    Visit the best Website health and information

    ReplyDelete
  2. Need Home Security System India for Home and Office, Contact DFS Services. Buy High Quality Home Security Intruder Alarm System or Burglar Alarm System, Video Doorbell and Security Cameras (IP Camera). Dfs Services is the best company for Home Security Systems in India.



    visit us:-security systems
    doorbell

    ReplyDelete
  3. Online Casino Game 2021 - Become Rich faster.
    You must be having the experience of sitting at home and watching your favourite Satta King online casino game results on television or PC. It is so exciting to see how your favourite players fare in real time. If you are not very good at playing blackjack or Disawar you just want to see how it is done for real, then it is the best option for you. This will give you a chance to learn more about the online casino game and how it works.
    Online Casino satta results will help you learn more. The satta game is very popular. The Satta is the second most popular game behind the slots. Playing online satta is very exciting and you can gain some idea about how it is done from online sattaking results.
    When you play satta game live, you can see how your favorite player does in a satta. One of the best ways to learn the rules of satta is by studying Satka matka sattaresults. Playing satta online can help you know how the satta works. You can read the instructions and follow the rules by using satta results. Once you understand how satta works online, you can take the satta games by using satta results.

    ReplyDelete
  4. I really like all of your writing. I hope you don't get bored to always share your experiences with me. Don't forget to visit my website below:

    https://www.merpatiku.my.id

    https://www.petsofusa.com

    https://www.healthzia.net

    https://www.celanapria.my.id

    ReplyDelete
  5. Nice Post Your content is very inspiring and appriciating I really like it please visit my site for
    Satta King and Satta king Charts or for super fast result satta matka also checkout my site Deshawar rescords you can also visit out site satta king result visit us on satta king faridabad satta king ghaziabad

    ReplyDelete
  6. Good information Post has very interesting and helped Would you wish to earn money on the internet easily? Afterward, Satta game is the perfect option for everybody please visit my site , and see live resuls and game post
    satta king
    black satta king
    charminar satta king
    satta live result

    ReplyDelete