Node Agent Metrics
This page describes metrics gathered by the CodeXray Node Agent.
Each container metric has the container_id label. This is a compound identifier whose format varies between container types — e.g., /docker/upbeat_borg, k8s/namespace-1/pod-2/container-3, or /system.slice/nginx.service.
CPU
container_resources_cpu_limit_cores
- Description: CPU limit of the container
- Type: Gauge
- Source: CPU cgroup, the
cpu.cfs_quota_usandcpu.cfs_period_usfiles
container_resources_cpu_usage_seconds_total
- Description: Total CPU time consumed by the container
- Type: Counter
- Source: CPU accounting cgroup, the
cpuacct.usagefile
container_resources_cpu_throttled_seconds_total
- Description: Total time duration the container has been throttled for
- Type: Counter
- Source: CPU cgroup, the
cpu.statfile
container_resources_cpu_delay_seconds_total
- Description: Total time duration the container has been waiting for a CPU (while being runnable)
- Type: Counter
- Source: Delay accounting
container_resources_cpu_pressure_waiting_seconds_total
- Description: Total time in seconds that the container was delayed due to CPU pressure
- Type: Counter
- Source: PSI (Pressure Stall Information)
- Labels:
kind
Memory
container_resources_memory_limit_bytes
- Description: Memory limit of the container
- Type: Gauge
- Source: Memory cgroup, file
memory.limit_in_bytes
container_resources_memory_rss_bytes
- Description: Amount of physical memory used by the container (doesn't include page cache)
- Type: Gauge
- Source: Memory cgroup, file
memory.stats
container_resources_memory_cache_bytes
- Description: Amount of page cache memory allocated by the container
- Type: Gauge
- Source: Memory cgroup, file
memory.stats
container_oom_kills_total
- Description: Total number of times the container has been terminated by the OOM killer
- Type: Counter
- Source: eBPF:
tracepoint/oom/mark_victim
container_resources_memory_pressure_waiting_seconds_total
- Description: Total time in seconds that the container was delayed due to memory pressure
- Type: Counter
- Source: PSI (Pressure Stall Information)
- Labels:
kind
Disk
container_resources_disk_delay_seconds_total
- Description: Total time duration the container has been waiting for I/Os to complete
- Type: Counter
- Source: Delay accounting
container_resources_io_pressure_waiting_seconds_total
- Description: Total time in seconds that the container was delayed due to I/O pressure
- Type: Counter
- Source: PSI (Pressure Stall Information)
- Labels:
kind
container_resources_disk_size_bytes
- Description: Total capacity of the volume
- Type: Gauge
- Source:
statfs() - Labels:
mount_point— path in the mount namespace of the containerdevice— device name, e.g.,vda,nvme1n1volume— Persistent Volume (Kubernetes only)
container_resources_disk_used_bytes
- Description: Used capacity of the volume
- Type: Gauge
- Source:
statfs() - Labels:
mount_point,device,volume
container_resources_disk_(reads|writes)_total
- Description: Total number of reads or writes completed successfully by the container
- Type: Counter
- Source: Blkio cgroup, the
blkio.throttle.io_servicedfile - Labels:
mount_point,device,volume
container_resources_disk_(read|written)_bytes_total
- Description: Total number of bytes read from the disk or written to the disk by the container
- Type: Counter
- Source: Blkio cgroup, the
blkio.throttle.io_service_bytesfile - Labels:
mount_point,device,volume
Network
container_net_tcp_listen_info
- Description: A TCP listen address of the container
- Type: Gauge
- Source: eBPF:
tracepoint/sock/inet_sock_set_state,/proc/<pid>/net/tcp,/proc/<pid>/net/tcp6 - Labels:
listen_addr(ip:port),proxy
container_net_tcp_successful_connects_total
- Description: Total number of successful TCP connection attempts
- Type: Counter
- Source: eBPF:
tracepoint/sock/inet_sock_set_state - Labels:
destination,actual_destination
destination vs actual_destinationThe IP and port of the connection's destination. For example, a container might be establishing a connection to port 80 of a Kubernetes Service IP (e.g., 10.96.1.1). This destination address may be translated by iptables to the actual Pod IP (e.g., 10.40.1.5). In this case, the actual_destination would be 10.40.1.5:80.
container_net_tcp_retransmits_total
- Description: Total number of retransmitted TCP segments. Collected only for outbound TCP connections.
- Type: Counter
- Source: eBPF:
tracepoint/tcp/tcp_retransmit_skb - Labels:
destination,actual_destination
container_net_tcp_failed_connects_total
- Description: Total number of failed TCP connects to a particular endpoint. The agent takes into account only TCP failures, so this metric doesn't reflect DNS errors.
- Type: Counter
- Source: eBPF:
tracepoint/sock/inet_sock_set_state - Labels:
destination
container_net_tcp_active_connections
- Description: Number of active outbound connections between the container and a particular endpoint
- Type: Gauge
- Source: eBPF:
tracepoint/sock/inet_sock_set_state - Labels:
destination,actual_destination
container_net_tcp_connection_time_seconds_total
- Description: Time spent on TCP connections
- Type: Counter
- Source: eBPF:
tracepoint/sock/inet_sock_set_state - Labels:
destination,actual_destination
container_net_latency_seconds
- Description: Round-trip time between the container and a remote IP
- Type: Gauge
- Source: ICMP round-trip time to IPs the container is currently talking to
- Labels:
destination_ip
container_net_tcp_bytes_(sent|received)_total
- Description: Total number of bytes sent/received from the peer
- Type: Counter
- Source: eBPF
- Labels:
destination,actual_destination
Application Layer Protocol Metrics
Each protocol below is auto-detected by the eBPF tracer; no instrumentation required.
HTTP
container_http_requests_total— Counter —destination,actual_destination,statuscontainer_http_requests_duration_seconds_total— Counter (histogram) —destination,actual_destination,le
PostgreSQL
container_postgres_queries_total— Counter —destination,actual_destination,statuscontainer_postgres_queries_duration_seconds_total— Counter (histogram) —destination,actual_destination,le
Redis
container_redis_queries_total— Counter —destination,actual_destination,statuscontainer_redis_queries_duration_seconds_total— Counter (histogram) —destination,actual_destination,le
Memcached
container_memcached_queries_total— Counter —destination,actual_destination,statuscontainer_memcached_queries_duration_seconds_total— Counter (histogram) —destination,actual_destination,le
MySQL
container_mysql_queries_total— Counter —destination,actual_destination,statuscontainer_mysql_queries_duration_seconds_total— Counter (histogram) —destination,actual_destination,le
MongoDB
container_mongo_queries_total— Counter —destination,actual_destination,statuscontainer_mongo_queries_duration_seconds_total— Counter (histogram) —destination,actual_destination,le
Kafka
container_kafka_requests_total— Counter —destination,actual_destination,statuscontainer_kafka_requests_duration_seconds_total— Counter (histogram) —destination,actual_destination,le
Cassandra
container_cassandra_queries_total— Counter —destination,actual_destination,statuscontainer_cassandra_queries_duration_seconds_total— Counter (histogram) —destination,actual_destination,le
RabbitMQ
container_rabbitmq_messages_total— Counter —destination,actual_destination,status,method
NATS
container_nats_messages_total— Counter —destination,actual_destination,method
DUBBO
container_dubbo_requests_total— Counter —destination,actual_destination,statuscontainer_dubbo_requests_duration_seconds_total— Counter (histogram) —destination,actual_destination,le
DNS
container_dns_requests_total— Counter —domain,request_type,statuscontainer_dns_requests_duration_seconds_total— Counter (histogram) —le
ClickHouse
container_clickhouse_queries_total— Counter —destination,actual_destination,statuscontainer_clickhouse_queries_duration_seconds_total— Counter (histogram) —destination,actual_destination,le
ZooKeeper
container_zookeeper_requests_total— Counter —destination,actual_destination,statuscontainer_zookeeper_requests_duration_seconds_total— Counter (histogram) —destination,actual_destination,le
ip_to_fqdn
- Description: Mapping IP addresses to FQDNs based on DNS requests initiated by containers
- Type: Gauge
- Source: eBPF DNS request tracking
- Labels:
ip,fqdn
GPU
container_resources_gpu_usage_percent
- Description: Percent of GPU compute resources used by the container
- Type: Gauge
- Source: NVIDIA Management Library (NVML)
- Labels:
gpu_uuid
container_resources_gpu_memory_usage_percent
- Description: Percent of GPU memory used by the container
- Type: Gauge
- Source: NVIDIA Management Library (NVML)
- Labels:
gpu_uuid
JVM
Each JVM metric has the jvm label which refers to the main class or path to the .jar file.
| Metric | Type | Description |
|---|---|---|
container_jvm_info | Gauge | Meta information about the JVM — labels jvm, java_version |
container_jvm_heap_size_bytes | Gauge | Total heap size in bytes |
container_jvm_heap_used_bytes | Gauge | Used heap size in bytes |
container_jvm_heap_max_size_bytes | Gauge | Maximum heap size in bytes (-Xmx) |
container_jvm_gc_time_seconds | Counter | Time spent in the given JVM garbage collector — label gc |
container_jvm_safepoint_time_seconds | Counter | Time stopped for safepoint operations |
container_jvm_safepoint_sync_time_seconds | Counter | Time spent getting to safepoints |
container_jvm_profiling_status | Gauge | Whether async-profiler is enabled (1/0) |
container_jvm_alloc_bytes_total | Counter | Total bytes allocated — requires --enable-java-async-profiler |
container_jvm_alloc_objects_total | Counter | Total objects allocated — requires --enable-java-async-profiler |
container_jvm_lock_contentions_total | Counter | Monitor enter events — requires --enable-java-async-profiler |
container_jvm_lock_time_seconds_total | Counter | Time waiting for locks — requires --enable-java-async-profiler |
Source for heap, GC, safepoint metrics: hsperfdata
Go Runtime
container_go_alloc_bytes_total
- Description: Total bytes allocated by a Go application
- Type: Counter
- Source: Go runtime memory profiling data (
runtime.mbuckets)
container_go_alloc_objects_total
- Description: Total objects allocated by a Go application
- Type: Counter
- Source: Go runtime memory profiling data (
runtime.mbuckets)
Node.js Runtime
container_nodejs_event_loop_blocked_time_seconds_total
- Description: Total time the Node.js event loop spent blocked
- Type: Counter
- Source: eBPF uprobes
Python Runtime
container_python_thread_lock_wait_time_seconds
- Description: Time spent waiting acquiring GIL in seconds
- Type: Counter
- Source: eBPF uprobes
.NET Runtime
Each .NET runtime metric has the application label, allowing distinction between multiple applications within the same container.
| Metric | Type | Description |
|---|---|---|
container_dotnet_info | Gauge | Meta information about the CLR — labels application, runtime_version |
container_dotnet_memory_allocated_bytes_total | Counter | Bytes allocated |
container_dotnet_exceptions_total | Counter | Exceptions that have occurred |
container_dotnet_memory_heap_size_bytes | Gauge | Heap size — label generation |
container_dotnet_gc_count_total | Counter | GC occurrences — label generation |
container_dotnet_heap_fragmentation_percent | Gauge | Heap fragmentation |
container_dotnet_monitor_lock_contentions_total | Gauge | Monitor lock contentions |
container_dotnet_thread_pool_completed_items_total | Counter | ThreadPool work items completed |
container_dotnet_thread_pool_queue_length | Gauge | ThreadPool queue length |
container_dotnet_thread_pool_size | Gauge | Current thread pool size |
Source for all .NET metrics: .NET diagnostic port
Logs
container_log_messages_total
- Description: The number of messages grouped by automatically extracted repeated patterns
- Type: Counter
- Source: The container's log. Supported logging methods:
- stdout/stderr — captured by Dockerd (JSON file driver) or Containerd (CRI)
- Journald
/var/log/*
- Labels:
source—journald,stdout/stderr, or path to the file in the/var/logdirectorylevel—unknown | debug | info | warning | error | criticalpattern_hash— the ID of the automatically extracted repeated patternsample— a sample message of the group
Other Container Metrics
container_info
- Description: Meta information about the container
- Type: Gauge
- Source: dockerd, containerd
- Labels:
image
container_restarts_total
- Description: Number of times the container has been restarted
- Type: Counter
- Source: eBPF:
tracepoint/task/task_newtask,tracepoint/sched/sched_process_exit
container_application_type
- Description: Type of application running in the container (e.g., memcached, postgres, mysql)
- Type: Gauge
- Source:
/proc/<pid>/cmdlineof processes running within the container - Labels:
application_type
Node Metrics
CPU
node_resources_cpu_usage_seconds_total— Counter — Amount of CPU time spent in each mode (user | nice | system | idle | iowait | irq | softirq | steal). Source:/proc/statnode_resources_cpu_logical_cores— Counter — Number of logical CPU cores. Source:/proc/stat
Memory
node_resources_memory_total_bytes— Gauge — Total amount of physical memorynode_resources_memory_free_bytes— Gauge — Amount of unassigned memorynode_resources_memory_available_bytes— Gauge — An estimate of how much memory is available for allocations, without swapping. Roughly the sum of free memory and reclaimable page cache.node_resources_memory_cached_bytes— Gauge — Amount of memory used as page cache
Source for all memory metrics: /proc/meminfo
Disk I/O
node_resources_disk_(reads|writes)_total— Counter —devicelabelnode_resources_disk_(read|written)_bytes_total— Counter —devicelabelnode_resources_disk_(read|write)_time_seconds_total— Counter — includes queue wait; divide by IOPS for avg latencynode_resources_disk_io_time_seconds_total— Counter — service time only, not queue wait. 100% utilization if derivative equals the sample window.
Source: /proc/diskstats
| Type | Max IOPS |
|---|---|
| Amazon EBS sc1 | 250 |
| Amazon EBS st1 | 500 |
| Amazon EBS gp2/gp3 | 16,000 |
| Amazon EBS io1/io2 | 64,000 |
| Amazon EBS io2 Block Express | 256,000 |
| HDD | 200 |
| SATA SSD | 100,000 |
| NVMe SSD | 10,000,000 |
Reference throughput:
| Type | Max throughput |
|---|---|
| Amazon EBS sc1 | 250 MB/s |
| Amazon EBS st1 | 500 MB/s |
| Amazon EBS gp2 | 250 MB/s |
| Amazon EBS gp3 | 1,000 MB/s |
| Amazon EBS io1/io2 | 1,000 MB/s |
| Amazon EBS io2 Block Express | 4,000 MB/s |
| SATA | 600 MB/s |
| SAS | 1,200 MB/s |
| NVMe | 4,000 MB/s |
Reference average I/O latency:
| Type | Avg latency |
|---|---|
| Amazon EBS gp2/gp3/io1/io2 | single-digit ms |
| Amazon EBS io2 Block Express | sub-ms |
| HDD | 2–4 ms |
| NVMe SSD | 0.1–0.3 ms |
Network
node_net_received_(bytes|packets)_total— Counter —interfacenode_net_transmitted_(bytes|packets)_total— Counter —interfacenode_net_interface_up— Gauge —interface(0 = down, 1 = up)node_net_interface_ip— Gauge —interface,ip
GPU
node_gpu_info— Gauge —gpu_uuid,namenode_resources_gpu_memory_total_bytes— Gauge —gpu_uuidnode_resources_gpu_memory_used_bytes— Gauge —gpu_uuidnode_resources_gpu_memory_utilization_percent_avg/_peak— Gauge —gpu_uuidnode_resources_gpu_utilization_percent_avg/_peak— Gauge —gpu_uuidnode_resources_gpu_temperature_celsius— Gauge —gpu_uuidnode_resources_gpu_power_usage_watts— Gauge —gpu_uuid
Node metadata
node_uptime_seconds— Gauge — Uptime of the nodenode_info— Gauge —hostname,kernel_version,agent_versionnode_cloud_info— Gauge — Cloud-provider metadata; auto-detected for AWS, GCP, Azure, Hetzner, Scaleway, DigitalOcean, Alibaba (can be set manually via--provider,--region,--availability-zoneflags)- Labels:
provider,account_id,instance_id,instance_type,instance_life_cycle,region,availability_zone,availability_zone_id(AWS only),local_ipv4,public_ipv4
- Labels:
Next Steps
- CodeXray Node Agent — install and configure the agent
- Cluster Agent Metrics — Kubernetes-scope metrics
- Architecture — how agent telemetry flows through the platform