Skip to main content

Deployment

Version Requirements

  • The Agent version needs to be 4.3.1.0 or later.
  • The Collector version needs to be 4.3.0.0 or later.

Installing Kubernetes UniAgent

Checking Whether the Environment Meets the Requirements

First, check whether the Kubernetes nodes (operating system, available CPU, available memory, available storage, etc.) meet the minimum requirements for running the eBPF network module.

  • The eBPF function requires a Linux kernel version later than 4.19, and the kernel compilation options need to have eBPF-related features enabled.

    • RedHat 8.0 or later
    • CentOS 8 or later
    • Debian 11 or later
    • Ubuntu 18 or later
    • KylinOS 10 SP3 or later
  • When the eBPF network module is enabled, it requires at least an additional 1 GB of available memory and 500 MB of disk space during runtime.

  • Before enabling the eBPF network module, ensure that your node resources meet the following requirements:

    • Node CPU: 4 cores or more
    • Node memory: 8 GB or more
    • Node available CPU: 1 core or more
    • Node available memory: 2 GB or more
    • Node available storage: 2 GB or more

To use this feature, you need to enable the Infrastructure Monitoring host license in the platform. By default, the eBPF network module is disabled and needs to be enabled manually.

Enabling the eBPF Network Function

On the deployment page, select Kubernetes and configure custom options: select Enable Infra and Monitor File System.

Download the YAML file.

In the YAML file, modify the network_enabled setting in oneagent.conf under tingyun-sys-config (default: false).

apiVersion: v1
kind: ConfigMap
metadata:
name: tingyun-sys-config
namespace: tingyun
data:
oneagent.conf: |
# APM master switch. This value is generated by the platform and cannot be modified.
apm_enabled=true
# Infrastructure Monitoring master switch. This value is generated by the platform and cannot be modified.
infra_enabled=true
#
# Process log collection switch for Infrastructure Monitoring. This value is generated by the platform and cannot be modified.
infra_log_enabled=false
#
# Master switch for eBPF network data collection.
# If you enable this switch, you also need to set the DaemonSet `tingyun-linux-agent` resource requests to CPU=0.5 and memory>=1Gi,
# and then restart the DaemonSet `tingyun-linux-agent`.
network_enabled=false # Set to true to enable

Then apply the YAML file:

kubectl apply -f tingyunagent.yaml 

Verify whether the eBPF network module has started. Run the following command on each node:

kubectl -n tingyun exec -ti tingyun-linux-agent-xxxxx -- ps -ef | grep ebpf-network

If the process exists, the eBPF network module is running. If the process does not exist, the eBPF network module is not running.

eBPF Network Module Circuit Breaker (Kubernetes)

After enabling eBPF network data collection, it will consume additional CPU and memory (typically below 10%). To prevent excessive impact on the system, the circuit breaker strategy is enabled by default.

The eBPF network module circuit breaker determines whether to trigger based on node CPU usage and available memory.

  • The default CPU threshold is 70% to 80%. When a node’s CPU usage exceeds 80%, the circuit breaker is triggered.
  • The default available memory threshold is 1 GB to 2 GB. When a node’s available memory is below 1 GB, the circuit breaker is triggered.
  • After a circuit breaker event, the network module will resume when the node’s CPU usage is below 70% and available memory is above 2 GB.

Viewing eBPF Network Module Logs

The eBPF Agent logs are stored in the tingyun-linux-agent-xxx DaemonSet pod.

View runtime logs:

kubectl -n tingyun exec -ti tingyun-linux-agent-vrtwk -- cat /opt/agent/ebpf/logs/ebpf-agent.log

View circuit-breaker logs:

kubectl -n tingyun exec -ti tingyun-linux-agent-vrtwk -- cat /opt/agent/logs/oneagent/watchdog.log

Installing UniAgent on a Linux Host

Checking Whether the Environment Meets the Requirements

First, check whether the host (operating system, available CPU, available memory, available storage, etc.) meets the minimum requirements for running the eBPF network module.

  • The eBPF function requires a Linux kernel version later than 4.19, and the kernel compilation options need to have eBPF-related features enabled.

    • RedHat 8.0 or later
    • CentOS 8 or later
    • Debian 11 or later
    • Ubuntu 18 or later
    • KylinOS 10 SP3 or later
  • When the eBPF network module is enabled, it requires at least an additional 1 GB of available memory and 500 MB of disk space during runtime.

  • Before enabling the eBPF network module, ensure that your host resources meet the following requirements:

    • Host CPU: 4 cores or more
    • Host memory: 8 GB or more
    • Host available CPU: 1 core or more
    • Host available memory: 2 GB or more
    • Host available storage: 2 GB or more

By default, the eBPF network module is disabled and needs to be enabled manually.

Enabling the eBPF Network Function

On the deployment page, select Linux and download and install UniAgent.

After the installation, set network_enabled=true in /opt/tingyun-oneagent/conf/oneagent.conf.

Then restart the service:

sudo systemctl restart tingyun-oneagent

Verify whether the eBPF network module has started:

ps -ef | grep ebpf-network

If the process exists, the eBPF network module is running. If the process does not exist, the eBPF network module is not running.

eBPF Network Module Circuit Breaker (Linux Host)

After enabling eBPF network data collection, it will consume additional CPU and memory (typically below 10%). To prevent excessive impact on the system, the circuit breaker strategy is enabled by default.

The eBPF network module circuit breaker determines whether to trigger based on host CPU usage and available memory.

  • The default CPU threshold is 70% to 80%. When CPU usage exceeds 80%, the circuit breaker is triggered.
  • The default available memory threshold is 1 GB to 2 GB. When available memory is below 1 GB, the circuit breaker is triggered.
  • After a circuit breaker event, the network module will resume when CPU usage is below 70% and available memory is above 2 GB.

Viewing eBPF Network Module Logs

View runtime logs:

cat /opt/tingyun-oneagent/logs/agent/ebpf-network.log

View circuit-breaker logs:

cat /opt/tingyun-oneagent/logs/oneagent/watchdog.log