Lab 7: Installing an agent and OHI
So far, we have had the pleasure of automation. This is the recommended experience for New Relic customers too. However, as an engineer completing New Relic tasks in the field it is important you have some experience of how to install a New Relic agent.
For this lab, you will install open source nginx on the Lab 4 instance and configure the New Relic plugin. This will serve a reverse proxy to the Tomcat 8 service. In the second part of this lab you will install and configure the New Relic Python agent.
Nginx OHI (On Host Integration)
Step 1: Creating the nginx reverse proxy
On your Lab 4 instance install nginx as such: sudo apt install nginx
Then perform the following two commands to enable nginx, and to ensure it turns on automatically.
sudo systemctl start nginx
sudo systemctl enable nginx
Now to create the configuration file: cd /etc/nginx/conf.d/
Then use vim to create tomcat.conf sudo vi tomcat.conf
And in the editor mode (press i):
Make sure you replace INSTANCE_PUBLIC_IP with the public IP of your Lab 4 instance. The rest remains the same. Then once finished hit escape and type :wq to write and quit.
Now test the nginx configuration: sudo nginx -t
And if successful, reload the new configuration: sudo nginx -s reload
Now you can visit your Lab 4 instance at the public IP and this should display your Tomcat 8 service.
Step 2: Enabling the New Relic OHI
Now that we have nginx installed and active, you should enable the On Host Integration where you can find instructions here .
For this one, you should follow the guide. Please reach out to emea-partner-enablement@newrelic.com if you are facing some issues.
Pro tips:
There is some quirk to this lab, and we would like you to discover what has to be done. You have been able to modify an nginx file as above and have a link to the documentation so you should be all set.
Another piece of advice, you do not need to rebuild nginx.
All going well, you should have an OHI appear as such:
Step 3: Installing a Ruby agent
If you have never installed an agent before, we would like you to follow the New Relic Ruby Kata lab . This will walk you through the deplpoyment of a demo Ruby app using Heroku (free) and connecting into your RPM account.
New lab for Kubernetes and Prometheus 1 Nov
There is a new lab for Kubernetes and Prometheus integration - Lab 11. Be sure to check it out to learn about installing Kubernetes locally, integrating with New Relic, integrating New Relic and Prometheus, and deploying a demo application to scrape metrics from.
Updated Synthetics Labs 28 OctLab 3 has been updated to include scripted API tests. It includes a topical build your own test too! (With some help added too).