Help Docs

Kubernetes container process monitoring

Monitor the processes running in each container of your Kubernetes cluster. Pinpoint which process within a container is driving up CPU or memory usage, all without needing to access the container.

Industry-wise use cases and benefits

Here are a few use cases and benefits:

Industry Use case Benefit
E-commerce Differentiate main app spikes from caching sidecar tasks (e.g., Redis syncs) during flash sales. Prevents latency spikes and Out Of Memory (OOM) kills before checkout flows collapse.
FinTech (banking) Correlate resource usage across transaction engines, fraud checks, and audit logging. Provides strict compliance auditing without granting engineers direct shell execution access to secure pods.
Healthcare Track ephemeral health checks, data pipeline syncs, and long-running patient record services. Automatically registers new processes during workload shifts to preserve system availability and auditability.
SaaS (tech) Isolate core microservices from telemetry sidecars (Fluent Bit, Istio proxy, and other agents). Pinpoints shared container resource consumption to isolate vendor issues from application issues.

Prerequisites

How to add a process to your Kubernetes monitoring

You can monitor a process running inside a Kubernetes container using one of the following methods:

Method 1: Manual addition

For immediate and targeted container process selection, follow the steps below:

  1. Log in to your Site24x7 account.
  2. Go to K8s from the left navigation menu.
  3. Select your cluster, then click Containers and choose your container.
  4. Go to the Processes tab.
  5. Click Discover Processes to view all processes currently running in the container.
  6. Select the process you want to track, and click Add to start monitoring.

Method 2: Configuration rules

To automate the container discovery, follow the steps below:

  1. Create configuration rules that apply once a container is added for monitoring.
  2. Under the Define Criteria section, in Criteria, select Container from the drop-down menu as the monitor type.
  3. Under the Define Actions section, configure the actions to be made by the monitors that satisfy the conditions set in the Define Criteria section.
  4. Select Add Processes and enter the path file details.
  5. Toggle between the options below:
    1. With Regex: Matches the process command-line arguments or absolute path against a regular expression, enabling flexible and precise process identification. For example: zylker###/usr/bin/zylker###-conf_file.*
    2. Without Regex: Matches the exact text entered in the input field against the process command-line arguments or absolute path. For example: python3###/usr/bin/python3###main.py --user=zylker --role=admin

Understanding regex patterns

If multiple instances of a process run inside a container but you only want to monitor those that start with a specific configuration file, use a regex pattern (ex: -conf_file=/etc/zylker/.*). This allows you to match only the command-line arguments that contain the pattern, ensuring that only relevant processes are picked up for monitoring while others are ignored.

Regex syntax:

<process-name>###<process-path>###<process-args>

Sample process:

/usr/bin/zylker -conf_file=/etc/zylker/zylker.json
/usr/bin/zylker -conf_file=/etc/zylker/zylker1.json

Sample regex:

zylker###/usr/bin/zylker###-conf_file.*

Syntax Description Example
<process-name> The name of the process or executable. zylker
<process-path> The absolute path to the process executable. /usr/bin/zylker
### A delimiter to separate the process path, name, and arguments. This is mandatory if you provide more than one value. ###
<process-args> The command-line arguments passed to the process. -conf_file=/etc/zylker/zylker.json

Note: This configuration supports multiple process entries.

View Kubernetes container processes

To view the processes running inside a container:

  1. Go to K8s from the left navigation menu.
  2. Select the cluster, then click Containers and select the required container.
  3. Click the Processes tab.

Monitor data

Processes

Metric name Description Units
Process CPU Usage (%) Trend chart showing the CPU consumed by each monitored process over the selected time period. Hover over the chart to see the CPU usage of each process at a specific point in time. Percentage
Process Memory Usage (%) Trend chart showing the memory consumed by each monitored process over the selected time period. Hover over the chart to see the memory usage of each process at a specific point in time. Percentage
Process Details The process name and execution path. An upward arrow indicates the monitoring is up and running; a downward arrow indicates the monitoring is down. Text
CPU (%) The percentage of CPU used by the process. Percentage
Memory (%) The percentage of memory used by the process. Percentage
Instances The number of instances of the process running inside the container. Count
Thread Count The number of threads running in the process. Count

Use the Discover Processes button to find and add new processes running inside the container for monitoring. Use the Threshold Configuration button to set CPU, memory, instance, or thread count thresholds for the processes listed.

Related articles

Was this document helpful?

Would you like to help us improve our documents? Tell us what you think we could do better.


We're sorry to hear that you're not satisfied with the document. We'd love to learn what we could do to improve the experience.


Thanks for taking the time to share your feedback. We'll use your feedback to improve our online help resources.

Shortlink has been copied!