Monitoring LXC Based Microservice Applications

August 27, 2019

Instana - Enterprise Observability and APM for Cloud-Native Applications

What is LXC?

According to “LXC is a userspace interface for the Linux kernel containment features. Through a powerful API and simple tools, it lets Linux users easily create and manage systems or application containers.”


LXC has been in active development since 2008, and is still used in many active production environments. As noted in GitHub, “LXC’s main focus is system containers. That is, containers which offer an environment as close as possible as the one you’d get from a VM but without the overhead that comes with running a separate kernel and simulating all the hardware.” LXC achieves this through a combination of kernel security features, mandatory access control, and control groups.

How to monitor LXC

In order to monitor LXC and its applications you need to understand how different components run and interrelate within the LXC environment. LXC does offer some monitoring capabilities with lxc-monitor. lxc-monitor monitors the state of containers and their resource utilization. But, to effectively monitor a container-based application requires visibility at the host, container, component, and code level. Lxc-monitor does not offer any monitoring capabilities beyond the container itself and therefore falls short of the holistic view needed to ensure an excellent customer experience in a production environment.

How to monitor LXC with Instana

Instana provides the most efficient way to discover and monitor containerized applications no matter which container runtime you’re using. Simply install the Instana Agent onto the host and the agent automatically discovers all containers and components running in the environment. Once discovered, the Agent deploys all appropriate monitoring sensors and begins tracing and analyzing every application request. Instana uses a combination of machine learning and preset health rules to automatically determine the health of the applications and infrastructure components. Metrics – With no manual effort required, Instana automatically identifies LXC running on the host and deploys and configures Instana’s LXC monitoring sensor. Instana references its curated knowledge base to understand what performance metrics are relevant to collect as well as what parameters must be configured. Specifically, Instana’s automatic configuration for LXC tracks things like CPU usage (Kernel,user), memory usage, cache memory, and network RX/TX bytes.

Containerd Metrics Screenshot 1

Health – In addition to automatically collecting performance metrics, the Instana LXC monitoring sensor automatically collects KPIs on the LXC process to determine its health. Health signatures from the curated knowledge base are used to raise Issues or Incidents depending on user impact. Two primary resources are CPU and Memory, for which Instana collects various KPIs including CPU Load, CPU Steal, and Memory Used.

How to monitor LXC based microservice applications with Instana

Monitoring LXC based microservices with Instana requires just a single agent per host. Once installed, every container on that host sends monitoring data through the single, lightweight agent, minimizing overhead while also simplifying the overall deployment of Instana. Instana will also automatically trace every application request flowing through your environment and pull together each distributed trace for a full, end-to-end view of every request. There are no partial traces or sampling of any kind so you’ll always have a complete data set to identify the root cause of any problematic request.

Containerd Distributed Trace 1

With Instana, you’ll benefit from full analysis of every user impact – performed automatically. By automating the correlation of all trace data with the underlying container and host metrics, Instana provides root cause analysis within a few seconds. This enables you to update your services as often as you need to without worrying if there are regressions impacting your customers.

Instana’s LXC monitoring includes automatic and continuous discovery, dependency mapping, metric monitoring, distributed tracing, anomaly detection, and analytics across the complete trace data set. This means you’ll always know everything that LXC is doing and the impact to user requests at all times. To see Instana’s LXC monitoring in action sign up for a free trial of Instana today.

Play with Instana’s APM Observability Sandbox

Conceptual, Featured, Thought Leadership
Building scalable systems has become more accessible over the past decade thanks to immutable infrastructure, containers, and orchestration platforms such as Kubernetes. As the complexity of these applications continues to accelerate the...
Announcement, Featured, Product
CRI-O is a Cloud Native Computing Foundation incubating project. According to their website, “CRI-O is an implementation of the Kubernetes CRI (Container Runtime Interface) to enable using OCI (Open Container Initiative) compatible...
Announcement, Featured, Product
Kubernetes (K8s) is an open source project that was originally created by Google. It was designed to help organizations automate the deployment and orchestration of their containerized applications. Development and Operations teams...

Start your FREE TRIAL today!

Instana, an IBM company, provides an Enterprise Observability Platform with automated application monitoring capabilities to businesses operating complex, modern, cloud-native applications no matter where they reside – on-premises or in public and private clouds, including mobile devices or IBM Z.

Control hybrid modern applications with Instana’s AI-powered discovery of deep contextual dependencies inside hybrid applications. Instana also gives visibility into development pipelines to help enable closed-loop DevOps automation.

This provides actionable feedback needed for clients as they to optimize application performance, enable innovation and mitigate risk, helping Dev+Ops add value and efficiency to software delivery pipelines while meeting their service and business level objectives.

For further information, please visit