{"id":661,"date":"2022-05-30T12:32:24","date_gmt":"2022-05-30T12:32:24","guid":{"rendered":"https:\/\/www.checkmateq.com\/blog\/?p=661"},"modified":"2023-08-07T17:01:50","modified_gmt":"2023-08-07T17:01:50","slug":"new-relic","status":"publish","type":"post","link":"https:\/\/www.checkmateq.com\/blog\/new-relic","title":{"rendered":"Application Performance Monitoring with New Relic"},"content":{"rendered":"<p><strong>New Relic<\/strong> <strong>One<\/strong> is a <strong>Software as a Service<\/strong> (SaaS) platform used for monitoring web, mobile applications, API calls, and infrastructure in real-time. We can monitor metrics, logs, events, and transactions through pre-built and custom dashboards and create alert policies. New Relic provides real-time alerts and anomaly detection so that the <a href=\"https:\/\/www.checkmateq.com\/devops-engineering\">DevOps engineering<\/a> team can ensure the smooth running of application and infrastructure.<\/p>\n<p>Here we will be monitoring a <a href=\"https:\/\/www.checkmateq.com\/java-development\"><strong>Java Application<\/strong><\/a> running in a <strong>docker<\/strong> <strong>container<\/strong>. For that first, we need to create an account on New Relic One. After that follow these steps:<\/p>\n<h3><strong>Step1:\u00a0\u00a0<\/strong>Login to your New Relic account.<\/h3>\n<ul>\n<li>Click On <strong>Add Data<\/strong> in the top right corner.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-665\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003615-300x39.png\" alt=\"\" width=\"746\" height=\"97\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003615-300x39.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003615-1024x133.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003615-768x100.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003615-1536x200.png 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003615-1200x156.png 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003615.png 1899w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Select your application language.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-666\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003822-300x174.png\" alt=\"application\" width=\"736\" height=\"427\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003822-300x174.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003822-768x446.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003822.png 960w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Click on <strong>Begin Installation<\/strong>.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-667\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003948-300x180.png\" alt=\"\" width=\"722\" height=\"433\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003948-300x180.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003948-1024x615.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003948-768x461.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-003948.png 1165w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Select <strong>On a host-&gt;Other Java Installation Options.<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-668\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-004152-300x182.png\" alt=\"application\" width=\"717\" height=\"435\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-004152-300x182.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-004152-768x465.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-004152.png 976w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Give a name to your application and download the configuration file.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-669\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-004526-300x127.png\" alt=\"application\" width=\"732\" height=\"310\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-004526-300x127.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-004526-1024x432.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-004526-768x324.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-004526.png 1111w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<h4><strong>Step2:<\/strong>\u00a0 Connect to the host in which your application is running.<\/h4>\n<ul>\n<li>Create the following directories.<\/li>\n<\/ul>\n<pre>mkdir newrelic\r\nmkdir logs\r\n<\/pre>\n<ul>\n<li>Download the <strong>New Relic Java Agent.<\/strong><\/li>\n<\/ul>\n<pre>curl -O https:\/\/download.newrelic.com\/newrelic\/java-agent\/newrelic-agent\/current\/newrelic-java.zip\r\n<\/pre>\n<ul>\n<li>Unzip and copy the files to the <strong>newrelic<\/strong> directory that we just created.<\/li>\n<\/ul>\n<pre>unzip newrelic-java.zip\r\n<\/pre>\n<ul>\n<li>Replace the\u00a0<strong><code>newrelic.yml<\/code><\/strong> file with the custom config file you downloaded.<\/li>\n<li>The startup script or command to start our application must contain Java\u2019s built-in argument\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <strong>-javaagent<\/strong>. We have to set this argument with <strong>JAVA_OPTS<\/strong> variable. \u00a0We also have to copy <strong>newrelic<\/strong> and <strong>logs<\/strong> directory to our container.<\/li>\n<\/ul>\n<pre>docker run -it -d --tmpfs \/run --tmpfs \/tmp --name travelapp \\\r\n\r\n<span style=\"font-family: Consolas, Monaco, monospace;\">-e JAVA_OPTS=\"-Xms128m -Xmx320m -XX:MaxPermSize=128m -javaagent:\/usr\/local\/tomcat\/newrelic\/newrelic.jar\" \\<\/span>\r\n\r\n<span style=\"font-family: Consolas, Monaco, monospace;\">-v ~\/newrelic:\/usr\/local\/tomcat\/newrelic \\<\/span>\r\n\r\n<span style=\"font-family: Consolas, Monaco, monospace;\">-v ~\/logs:\/usr\/local\/tomcat\/logs \\<\/span>\r\n\r\n<span style=\"font-family: Consolas, Monaco, monospace;\">-p 8081:8080\u00a0 chkmt\/travel:latest<\/span><\/pre>\n<ul>\n<li>To monitor host infrastructure, copy this command<\/li>\n<\/ul>\n<pre>docker run \\\r\n-d \\\r\n--name newrelic-infra \\\r\n--network=host \\\r\n--cap-add=SYS_PTRACE \\\r\n--privileged \\\r\n--pid=host \\\r\n-v \"\/:\/host:ro\" \\\r\n-v \"\/var\/run\/docker.sock:\/var\/run\/docker.sock\" \\\r\n-e NRIA_LICENSE_KEY=\"Enter your license key here\" \\\r\nnewrelic\/infrastructure:latest\r\n<\/pre>\n<h3>Step3: See your data.<\/h3>\n<ul>\n<li>Click on <strong>See your data.<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-684\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-140151-300x84.png\" alt=\"application\" width=\"743\" height=\"208\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-140151-300x84.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-140151-768x214.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-140151.png 973w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>If the connection was successful you will see the option to <strong>Explore your data<\/strong>, now click on it.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-685\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-140233-300x119.png\" alt=\"\" width=\"734\" height=\"291\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-140233-300x119.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-140233.png 598w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Next, you will see a dashboard like this. You can see on the left side different parameters that you can monitor like <strong>Distributed Tracing, Databases, Transactions, JVM,<\/strong> etc.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-687\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-151742-300x126.png\" alt=\"application\" width=\"745\" height=\"313\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-151742-300x126.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-151742-1024x431.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-151742-768x324.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-151742-1536x647.png 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-151742-1200x506.png 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-151742.png 1861w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-690\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-155322-300x135.png\" alt=\"\" width=\"740\" height=\"333\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-155322-300x135.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-155322-1024x461.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-155322-768x345.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-155322.png 1147w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/> <img loading=\"lazy\" class=\"alignnone wp-image-691\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-155417-300x173.png\" alt=\"application\" width=\"730\" height=\"421\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-155417-300x173.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-155417-1024x592.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-155417-768x444.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-155417.png 1029w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>To monitor host infrastructure click on<strong> Explorer-&gt;Infrastructure-&gt;Hosts<\/strong>.<\/li>\n<li>Select your host.<\/li>\n<li>You can now see metrics like CPU usage, free memory, etc.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-693\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-172757-300x154.png\" alt=\"application\" width=\"731\" height=\"375\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-172757-300x154.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-172757-768x395.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-172757.png 907w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>You can also monitor logs from New Relic. Go to Logs.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-694\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-172847-300x124.png\" alt=\"application\" width=\"728\" height=\"301\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-172847-300x124.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-172847-1024x423.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-172847-768x317.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-172847-1200x496.png 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/05\/Screenshot-2022-05-30-172847.png 1375w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p><strong>Author Details<\/strong><\/p>\n<p>This blog is written by M\/S checkmate global technologies cloud engineering team, Please <a href=\"https:\/\/www.checkmateq.com\/contact-us\">write<\/a> to them for seamless cloud infrastructure migration, infrastructure monitoring platform deployment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>New Relic One is a Software as a Service (SaaS) platform used for monitoring web, mobile applications, API calls, and infrastructure in real-time. We can monitor metrics, logs, events, and transactions through pre-built and custom dashboards and create alert policies. New Relic provides real-time alerts and anomaly detection so that the DevOps engineering team can &hellip; <a href=\"https:\/\/www.checkmateq.com\/blog\/new-relic\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Application Performance Monitoring with New Relic&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":663,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[15,4,3,17,2,7],"_links":{"self":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/661"}],"collection":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/comments?post=661"}],"version-history":[{"count":21,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/661\/revisions"}],"predecessor-version":[{"id":4338,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/661\/revisions\/4338"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/media\/663"}],"wp:attachment":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/media?parent=661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/categories?post=661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/tags?post=661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}