Infrastructure monitoring for cloud and next-generation resources can be a challenging and complex problem in managing large scale, high-performance enterprise cloud solutions. Oracle Management Cloud (OMC) provides a great solution that is easy to set-up and use and provides a full set of reporting metrics and alerts that help us manage and monitor Oracle Cloud solutions for our customers on a daily basis.

Docker containers are one of the core components used in many of our projects. In this blog, I will share my experiences based on the solution we implemented using OMC for Docker Containers on one of our customer projects. The blog covers:

  1. An overview of the Platform
  2. Setting up the OMC Agents
  3. Setting up Docker Containers and Engine in OMC
  4. Monitoring and Configuring Alerts for Docker Containers

1. Overview of the Platform

First, let me take you through the Dockerized platform we are working with:

2. Setting up the OMC Agents

OMC Cloud Agent should be installed on the Compute Node. Follow the steps below.

  • Create two directories OMC and cloudagent to create the directory structure shown below:
    /home/opc/OMC/cloudagent

  • Open the OMC console, navigate to Administration --> Agents and click on the Download tab

2

  • Copy the TENANT _ NAME and OMC _ URL into a notepad for future use. Download the cloud agent file for the specific OS.
    Then click on the Registration Keys tab and create a key.

  • Once you have created the key, it will display as shown below, copy the key into notepad for future use.

  • Upload the downloaded cloud agent file onto your compute node into the location (/home/opc/OMC/cloudagent).
  • Unzip the cloudagent file and then modify the Agent.rsp file as shown in the screenshot below with
    TENANT _ NAME, OMC _ URL, AGENT _ REGISTRATION_KEY and AGENT _ BASE _ DIRECTORY.

  • Run ./AgentInstall.sh and check whether the cloud agent is running in the OMC Console Page.

    Administration --> Agents -->Cloud Agents

3. Setting up Docker Containers and Engine in OMC

  • Create /etc/docker/daemon.json file to connect to the UNIX socket and an IP address as follows:

Note: This is an additional step required if you are running Docker containers on Oracle Compute Service.

    {
    "hosts": ["unix:///var/run/docker.sock", 
    "tcp://0.0.0.0:2375"]
    }
  • Restart the Docker Engine.

      sudo systemctl restart docker.service
    
  • Check if the change was honored by reviewing the output of netstat command to confirm docker daemon (dockerd) is listening on the configured port.

      sudo netstat -lntp | grep dockerd
    

  • Now, login into OMC console, go to Administration -->Discovery-->Add Entity.
    Select the Docker Engine, Hostname Cloud Agent and provide the BASE_URL (port you configured in daemon.json) as shown below.

  • Click on the Add Entity button.

  • Once that's done, we can monitor the metrics of the Docker Engine as shown below.

4. Monitoring and Configuring Alerts for Docker Containers and Engine

  • Navigate to Administration --> Monitoring Admin -->Alert Rules.
  • Click on the Create Alert Rule button.
  • And Save once you have configured.

To assign license editions to selected entities:

  • Select Administration > Entity Configuration in the navigation menu and then click Licensing under Entities Configuration.
  • The selected entities are displayed on the Licensing page.
  • For each entity, select the license editions from the License Edition and Config & Compliance drop-down lists and click Save.
  • The Config & Compliance drop-down list is disabled until a license edition is selected in the License Edition drop-down list.

After license editions have been assigned or changed, the Entities tile on the Licensing page is updated.

2019-03-19-14_56_35-Settings-1

From our project experience, there is a significant usage of Docker in production grade implementations. Platform independence is an important consideration in building production quality applications. For this reason, we find it good practice to separate out business functions to run in separate containers, for example:

  • Backend application logic
  • Database for data store

Setting up containers in this way provides a separation of business functions. For instance, the backend components for Oracle products like Oracle Digital Assistant can be deployed in an MCS backend or any other Cloud Services such as AWS, Heroku, Oracle Compute etc. each having their own mechanism of deployment.

Docker is really helpful in achieving this platform independence as an image works the same way in every platform (Windows, Linux, etc) thereby making the deployment process consistent across platforms and therefore much more repeatable.

Docker containers also come in handy for monitoring and updating the code. Otherwise, this can be a time consuming process to modify the app specific to each platform you are deploying to.

From the screenshot below you can see the monitoring metrics provided out of the box from OMC. This allows us to easily track the status, CPU, memory and more of our applications running on Docker.



Conclusion:

OMC provides real-time infrastructure monitoring, alerting, operational insight, orchestration, and business analytics into your containers and applications.

Through the OMC dashboard, we can quickly and efficiently identify and fix application issues by eliminating unnecessary complex manual monitoring steps and the need to use many disparate tools. It also drives proactive systematic problem identification and highlights capacity issues before they become a problem.

The beauty of OMC is we can easily configure and set up the monitoring alerts and metrics for system hosts, containers, and applications based on our diverse project requirements. Hence, it is one of our primary Monitoring and Management Services for use on Oracle Cloud projects.

It is really easy to get started using OMC to monitor your existing applications. We hope this blog post will help you get started with OMC on your own projects. If you have any questions feel free to contact me on the blog post comments, I would love to hear your feedback.

Thank you for reading.

Acknowledgements
I would like to acknowledge a few people that have contributed to this blog post, helping with reviews/testing/validation. Thanks to my Rubicon Red colleagues - Satya, Dileep and Jagadeesh.