When discussing modern applications, Docker is a major part of the conversation – and monitoring Docker and containerized applications is a critical success factor. This tutorial on Getting Started With Docker Monitoring begins with installing the Docker Certified Instana agent as a container to monitor your applications and infrastructure. After completing this tutorial, you will have a fully functional Instana application monitoring instance, a running microservices sample application, and the ability to generate load on the application to see the monitoring results.
- Sign up for self service trial
- Optionally get Stan’s Robot Shop running
- Install Instana agent
- See results
Sign Up for a Free Instana Trial Account
See that button on the top right of the page – the one that has “Get Started” in it? Click it, then select “Free Trial.” Fill out the information requested in the form. An Instana free trial provisions a fully functional complete environment (with unlimited users) for 2 weeks.
Install Stan’s Robot Shop – Sample Microservices Application
If you have your own application available to monitor, great, go ahead and use that if you want.
Stan’s Robot Shop is an open source sample microservices application that is small enough to run on a developer’s laptop or small virtual machine, 2 CPU and 4GB memory. If you have a MacBook Pro as your laptop, you’ll have to use VirtualBox or something similar to run a Linux instance, as the agent is not supported on MacOS.
You will also want a newish version of Docker running on your host and the docker-compose utility. Now grab a copy of Stan’s Robot Shop either by using git to clone it or just downloading the zip file from the git repository page.
Now you have the Robot Shop files on your host, time to fire it up!
$ cd robot-shop $ docker-compose pull $ docker-compose up -d
Stan’s shop is now available on http://<your host>:8080/
Verify that it’s working, you should be able to browse through the catalogue and see some of Stan’s friends. Don’t worry though – you will not actually buy any robots.
Install Instana Agent as Docker Container
Login to your Instana instance (if you’re not still on the website, check your Inbox). From the Instana dashboard, select Management Portal from the dropdown menu at the top right.
Select INSTALL AGENT
Use the COPY button on the right column “Docker based”. This will copy the command to your system clipboard. Paste this into a shell prompt on your host. The agent is now deployed in to the same Docker engine as Stan’s Robot Shop.
Back at the main Instana dashboard, make sure you’re in the Infrastructure -> Map view then wait while the agent automatically discovers all the containers and the technology running inside them, it will only take a couple of minutes. Use the time dropdown at the top right to set the time range to “Last 10 minutes” and click the “>LIVE” button to have the map automatically refresh.
That was easy! You are now monitoring a microservices application with minimal effort.
The complete infrastructure stack is automatically discovered and monitored.
As you navigate Stan’s Robot Shop all the requests are automatically traced end to end, resulting in all the logical services and their endpoints being automatically discovered as well.
To save the miles on your mouse there is a load generation script included with with Stan’s Robot Shop. Run this on the same host that is running the Robot Shop.
$ cd robot-shop/load-gen
As the load generation script runs, every request is traced end to end proving service and endpoint discovery, including monitoring for: rate, errors and duration.
All services and endpoints automatically discovered
Relationships between services, and services to data stores automatically tracked
The Need for Speed
Instana provides automatic monitoring for containerised applications. The high level of automation ensures that the monitoring is always up to date with minimal effort from your DevOps team. Monitoring at the speed of CI/CD. Give it a try today.