DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • How to Move System Databases to Different Locations in SQL Server on Linux
  • Auto Remediation of GuardDuty Findings for a Compromised ECS Cluster in AWSVPC Network Mode
  • How Do the Docker Client and Docker Servers Work?
  • Dockerizing an Ansible Playbook, Part 1

Trending

  • Snowflake vs. Data Bricks: Compete To Create the Best Cloud Data Platform
  • Introduction to ESP32 for Beginners Using the Xedge32 Lua IDE
  • How To Simplify Multi-Cluster Istio Service Mesh Using Admiral
  • Parallel Sort
  1. DZone
  2. Coding
  3. Tools
  4. Tips on Deploying ECS Support for Server Monitoring

Tips on Deploying ECS Support for Server Monitoring

Deploying ECS for server monitoring? Here are some sweet tips to make sure you've got your metrics covered.

Fredric Paul user avatar by
Fredric Paul
·
Jan. 01, 16 · Analysis
Like (2)
Save
Tweet
Share
2.73K Views

Join the DZone community and get the full member experience.

Join For Free

Docker monitoring with New Relic is designed to add an app-centric view of Docker containers to the existing New Relic Servers interface. To use it, customers need to deploy the New Relic Linux Server Monitor (LSM) on the Amazon Elastic Compute Cloud (EC2) instances used by the Amazon EC2 Container Service (ECS), which provides Amazon customers with an easy way to manage and deploy Docker-based containers. This post is intended to show you how to do that.

Support for ECS and Docker can add significant value to your monitoring. Our LSM Docker support provides a view of Docker containers that is very similar to the New Relic Servers process view. When Docker is running on a host and the feature is enabled (as it is by default), LSM will list all of the containers in use on the host and give you a quick overview of which Docker images are consuming the most CPU time and memory. The sample screenshot below, for example, shows two Docker images sorted by CPU:

new relic servers screenshot

LSM Basics

Before diving into the installation process, let’s take a moment to look at the basic conditions that LSM requires in order to execute. (We’ll concentrate on the system-level requirements as opposed to installation-specific requirements such as the configuration file and license key.)

In order for LSM to gather all of the system metrics to populate the graphs in the Servers page, it needs access to information stored by the kernel specifically for programs like LSM to query. This is done by accessing a number of special files in system directories such as /proc and /dev. On most Linux distributions the files required by LSM do not require special access privileges. There is no requirement for LSM to be run as the superuser.

As most developers are now aware, Docker is a virtualization technology that sits on top of Linux. It provides a mechanism for controlling the runtime environment for your applications. Although it is possible to run LSM from within a Docker/ECS container, we discourage this because it requires you to jump through several hoops when constructing the image that is to contain LSM. The preferred way of running LSM is at the operating system (EC2) level, so that it can report on overall system usage as well as individual Docker images.

Using LSM on ECS/EC2

How you install LSM on the EC2 instance depends on how it is set up. By default, ECS instances are hosted on a special Amazon Linux AMI.

LSM officially supports a number of popular Linux distributions, and we provide tar distributions for other versions of Linux. If your EC2 server is running Red Hat Enterprise Linux (RHEL) or one of its many derivatives (such as CentOS), then you would install LSM on that instance using the standard RHEL instructions. You would use a similar approach for Debian-based systems.

If you are using a different version of Linux, you will need to do a manual installation using the tar distribution. Please check the New Relic documentation for full details on how to install LSM.

Since EC2 servers are no different (from an LSM perspective) than bare metal servers, you don’t have to do anything “extra” or “special” to have LSM monitor your EC2 hosts. If those hosts are running ECS instances, LSM will automatically monitor those too.

In a nutshell, LSM should “just work” as long as you install it on the bare EC2 instance, not inside an ECS container.

Kean Johnston is a senior software engineer for New Relic.

Entity component system Docker (software) operating system Linux (operating system)

Published at DZone with permission of Fredric Paul, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • How to Move System Databases to Different Locations in SQL Server on Linux
  • Auto Remediation of GuardDuty Findings for a Compromised ECS Cluster in AWSVPC Network Mode
  • How Do the Docker Client and Docker Servers Work?
  • Dockerizing an Ansible Playbook, Part 1

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: