rsdatakit
rsdatakit is a lightweight Rust collector for Linux hosts and Kubernetes nodes. It sends data to Dataway in the DataKit/Guance Point v2 format.
Features¶
| Module | Default | Collected data |
|---|---|---|
| Host | Enabled | cpu, mem, disk, diskio, net, and system metrics plus the HOST object. |
| Logs | Disabled | Files, systemd journal, persistent offsets, multiline records, and file rotation. |
| OpenTelemetry | Disabled | Trace ingestion over OTLP/HTTP and OTLP/gRPC. |
| Kubernetes | Disabled | Local-node Pod/container metrics, objects, container logs, and metadata enrichment. |
| Prometheus | Disabled | Node-local target discovery and Prometheus/OpenMetrics scraping. |
Linux amd64 and arm64 are supported. Windows, macOS, OTLP Metrics, OTLP Logs, eBPF, dial testing,
remote configuration, and the DataKit plugin system are not supported.
DataKit compatibility
Implemented data uses DataKit-compatible measurements, object classes, and core field names, so workspace views based on those fields can be reused. DataKit-only fields not listed here are not emitted by rsdatakit, and panels that require them may remain empty.
Requirements¶
- Linux hosts must expose
/procand/sys; journald collection also requires the systemd journal runtime library. - Managing the
rsdatakitservice with the installer requires systemd andsystemctl. - Kubernetes collection must run as a DaemonSet on each collected node and be allowed to read Pod metadata, Kubelet Summary, and host container-log directories.
- A reachable Dataway URL and token are required. Restrict access to configuration and state directories.
Installation¶
The installer supports Linux amd64 and arm64, requires root privileges or sudo, and
manages the service with systemd. Install the latest version:
RSDATAKIT_DATAWAY_URL="https://openway.truewatch.com" \
RSDATAKIT_DATAWAY_TOKEN="<DATAWAY_TOKEN>" \
sh -c "$(curl -fsSL https://static.truewatch.com/rsdatakit/install.sh)"
To install a specific release, replace <VERSION> with the complete version:
RSDATAKIT_DATAWAY_URL="https://openway.truewatch.com" \
RSDATAKIT_DATAWAY_TOKEN="<DATAWAY_TOKEN>" \
sh -c "$(curl -fsSL https://static.truewatch.com/rsdatakit/install-<VERSION>.sh)"
The installer selects the host architecture, verifies the archive, installs the binary and
systemd unit, and starts rsdatakit.service. The default configuration file is
/etc/rsdatakit/rsdatakit.toml.
To upgrade to the latest release, set RSDATAKIT_UPGRADE=1:
An upgrade replaces the binary and restarts the service while preserving
/etc/rsdatakit/rsdatakit.toml and the WAL and collection state under /var/lib/rsdatakit.
To switch Dataway during an upgrade, also provide new RSDATAKIT_DATAWAY_URL and
RSDATAKIT_DATAWAY_TOKEN values. To upgrade to a specific release, use
install-<VERSION>.sh.
Set RSDATAKIT_INSTALL_ONLY=1 to install or upgrade without starting the service. Verify the
result with:
RustDataKit is deployed as a DaemonSet, with one collector instance on each Linux node. The
manifest references a multi-architecture image for linux/amd64 and linux/arm64.
First download the latest rsdatakit.yaml manifest:
To install a specific release, replace <VERSION> with the complete version:
The Dataway URL, workspace token, and OTLP token are provided through a Kubernetes Secret. Create the namespace and write the actual configuration:
kubectl create namespace rsdatakit-system --dry-run=client -o yaml | kubectl apply -f -
kubectl -n rsdatakit-system create secret generic rsdatakit-secrets \
--from-literal=dataway-url='https://openway.truewatch.com' \
--from-literal=dataway-token='<DATAWAY_TOKEN>' \
--from-literal=otlp-token='<OTLP_TOKEN>' \
--dry-run=client -o yaml | kubectl apply -f -
When using another Dataway node, replace dataway-url with its actual endpoint. If the OTLP
receiver is not used, otlp-token can be an empty string.
Install the YAML:
Verify the DaemonSet and Pod status after installation:
kubectl -n rsdatakit-system rollout status daemonset/rsdatakit
kubectl -n rsdatakit-system get pods -l app.kubernetes.io/name=rsdatakit
View runtime logs:
Configuration¶
The default configuration path is /etc/rsdatakit/rsdatakit.toml. Use --config <path> or
RSDATAKIT_CONFIG to select another file. Configuration is read only at startup; restart the
service after changing it.
The following is the smallest useful configuration:
[agent]
# Local state directory for the WAL and file-log read positions. Must be absolute.
state_dir = "/var/lib/rsdatakit"
# Optional standalone health-listener address. Leave empty to disable it.
health_addr = ""
[dataway]
# Workspace Dataway endpoint.
url = "https://openway.example.com"
# Workspace token.
token = "<DATAWAY_TOKEN>"
# Per-request Dataway timeout in seconds. Valid range: 1–60.
timeout_secs = 15
# Tags added to all reported data.
global_tags = { env = "prod" }
# Target index. Uses the workspace default index when empty.
storage_index = ""
[metrics]
# Host metrics collection interval in seconds. Valid range: 5–300.
interval_secs = 15
# Mount points whose capacity is collected. Maximum: 32. Each must be absolute.
mounts = ["/"]
# Also collect virtual interfaces such as veth, docker0, and cni.
enable_virtual_interfaces = false
[hostobject]
# HOST object reporting interval in seconds. Valid range: 60–3600.
interval_secs = 300
[wal]
# Local write-ahead log directory. Must be absolute.
dir = "/var/lib/rsdatakit/wal"
# Total WAL capacity in bytes. Valid range: 4 MiB–256 MiB; the oldest unsent data is evicted when full.
max_bytes = 268435456
agent.state_dir, logs.state_dir, and wal.dir must be absolute paths. The default WAL capacity
is 256 MiB. Set wal.max_bytes according to the acceptable Dataway outage duration and the volume
of logs and traces.
At process startup, RSDATAKIT_DATAWAY_URL and RSDATAKIT_DATAWAY_TOKEN can override the endpoint and token separately; RSDATAKIT_HEALTH_ADDR overrides the standalone health address.
Host collection¶
Host metrics and the HOST object start by default; they do not have a separate enabled switch.
| Data | Measurement / object | Default interval | Description |
|---|---|---|---|
| CPU | cpu |
15 seconds | Aggregate CPU utilization. |
| Memory | mem |
15 seconds | Capacity, cache, used memory, and percentages. |
| Disk capacity | disk |
15 seconds | Only mounts listed in [metrics].mounts; / by default. |
| Disk I/O | diskio |
15 seconds | Block-device counters, throughput, and await. |
| Network | net |
15 seconds | Up, non-virtual interfaces by default. |
| System | system |
15 seconds | Load, CPU/memory utilization, process count, and uptime. |
| Host object | HOST |
300 seconds | Host identity, operating system, and basic resource information. |
The host metric interval is limited to 5–300 seconds, and the HOST interval to 60–3600 seconds.
CPU, network, and disk I/O rates require two samples, so rate fields may be absent on the first run.
Metrics¶
The tables below describe only the fields currently emitted by rsdatakit. Measurement and field names are compatible with their DataKit counterparts, but rsdatakit does not implement every extended field exposed by the corresponding DataKit collectors.
cpu¶
| Tags & Fields | Description |
|---|---|
| host ( tag) |
Hostname. |
| cpu ( tag) |
CPU identifier. Currently fixed to cpu-total, the aggregate across all CPUs. |
| usage_user | CPU time spent in user mode. Type: float | (gauge) Unit: percent |
| usage_nice | CPU time spent running low-priority user processes. Type: float | (gauge) Unit: percent |
| usage_system | CPU time spent in kernel mode. Type: float | (gauge) Unit: percent |
| usage_idle | CPU idle time. Type: float | (gauge) Unit: percent |
| usage_iowait | CPU time waiting for I/O completion. Type: float | (gauge) Unit: percent |
| usage_irq | CPU time servicing hardware interrupts. Type: float | (gauge) Unit: percent |
| usage_softirq | CPU time servicing software interrupts. Type: float | (gauge) Unit: percent |
| usage_steal | CPU time stolen by other systems in a virtualized environment. Type: float | (gauge) Unit: percent |
| usage_guest | CPU time running guest virtual CPUs. Type: float | (gauge) Unit: percent |
| usage_guest_nice | CPU time running low-priority guest virtual CPUs. Type: float | (gauge) Unit: percent |
| usage_total | Aggregate CPU utilization. Type: float | (gauge) Unit: percent |
mem¶
| Tags & Fields | Description |
|---|---|
| host ( tag) |
Hostname. |
| total | Total physical memory. Type: int | (gauge) Unit: digital,B |
| available | Memory the kernel estimates is currently available. Type: int | (gauge) Unit: digital,B |
| used | Memory calculated as total - free - buffered - cached.Type: int | (gauge) Unit: digital,B |
| free | Unused memory. Type: int | (gauge) Unit: digital,B |
| buffered | Kernel buffer memory. Type: int | (gauge) Unit: digital,B |
| cached | Page cache plus reclaimable slab memory. Type: int | (gauge) Unit: digital,B |
| used_percent | Used memory as a percentage of total memory. Type: float | (gauge) Unit: percent |
| available_percent | Available memory as a percentage of total memory. Type: float | (gauge) Unit: percent |
disk¶
One Point is emitted for each mount listed in [metrics].mounts.
| Tags & Fields | Description |
|---|---|
| host ( tag) |
Hostname. |
| device ( tag) |
Device backing the mount, or unknown when it cannot be resolved. |
| fstype ( tag) |
File-system type, or unknown when it cannot be resolved. |
| mount_point ( tag) |
Mount path. |
| total | Total file-system capacity. Type: int | (gauge) Unit: digital,B |
| free | Free file-system capacity. Type: int | (gauge) Unit: digital,B |
| used | Used file-system capacity. Type: int | (gauge) Unit: digital,B |
| used_percent | Percentage of file-system capacity in use. Type: float | (gauge) Unit: percent |
| inodes_total | Total inodes. Omitted when the file system does not report inode data. Type: int | (gauge) Unit: count |
| inodes_free | Free inodes. Type: int | (gauge) Unit: count |
| inodes_used | Used inodes. Type: int | (gauge) Unit: count |
| inodes_total_mb | Compatibility field containing inodes_total / 1,000,000.Type: int | (gauge) |
| inodes_free_mb | Compatibility field containing inodes_free / 1,000,000.Type: int | (gauge) |
| inodes_used_mb | Compatibility field containing inodes_used / 1,000,000.Type: int | (gauge) |
| inodes_used_percent | Percentage of inodes in use. Type: float | (gauge) Unit: percent |
diskio¶
One Point is emitted for every Linux block device with non-zero I/O counters.
| Tags & Fields | Description |
|---|---|
| host ( tag) |
Hostname. |
| name ( tag) |
Block-device path, for example /dev/vda. |
| serial ( tag) |
Device serial from udev, or unknown when unavailable. |
| reads | Completed read requests since boot. Type: int | (count) Unit: count |
| writes | Completed write requests since boot. Type: int | (count) Unit: count |
| merged_reads | Cumulative merged read requests. Type: int | (count) Unit: count |
| merged_writes | Cumulative merged write requests. Type: int | (count) Unit: count |
| read_bytes | Cumulative bytes read. Type: int | (count) Unit: digital,B |
| write_bytes | Cumulative bytes written. Type: int | (count) Unit: digital,B |
| read_time | Cumulative read time. Type: int | (count) Unit: ms |
| write_time | Cumulative write time. Type: int | (count) Unit: ms |
| io_time | Cumulative time spent performing I/O. Type: int | (count) Unit: ms |
| weighted_io_time | Cumulative weighted I/O time. Type: int | (count) Unit: ms |
| iops_in_progress | I/O requests currently in progress. Type: int | (gauge) Unit: count |
| read_bytes/sec | Average read throughput during the interval; omitted on the first sample. Type: int | (gauge) Unit: traffic,B/s |
| write_bytes/sec | Average write throughput during the interval; omitted on the first sample. Type: int | (gauge) Unit: traffic,B/s |
| await | Average wait per read/write request during the interval; omitted on the first sample. Type: float | (gauge) Unit: ms |
net¶
One Point is emitted for every interface that passes the configured filter and has a previous sample.
| Tags & Fields | Description |
|---|---|
| host ( tag) |
Hostname. |
| interface ( tag) |
Network interface name. |
| bytes_sent | Cumulative bytes transmitted. Type: int | (count) Unit: digital,B |
| bytes_recv | Cumulative bytes received. Type: int | (count) Unit: digital,B |
| packets_sent | Cumulative packets transmitted. Type: int | (count) Unit: count |
| packets_recv | Cumulative packets received. Type: int | (count) Unit: count |
| err_in | Cumulative receive errors. Type: int | (count) Unit: count |
| err_out | Cumulative transmit errors. Type: int | (count) Unit: count |
| drop_in | Cumulative receive drops. Type: int | (count) Unit: count |
| drop_out | Cumulative transmit drops. Type: int | (count) Unit: count |
| bytes_sent/sec | Bytes transmitted per second during the interval. Type: int | (gauge) Unit: traffic,B/s |
| bytes_recv/sec | Bytes received per second during the interval. Type: int | (gauge) Unit: traffic,B/s |
| packets_sent/sec | Packets transmitted per second during the interval. Type: int | (gauge) Unit: count/s |
| packets_recv/sec | Packets received per second during the interval. Type: int | (gauge) Unit: count/s |
system¶
| Tags & Fields | Description |
|---|---|
| host ( tag) |
Hostname. |
| load1 | One-minute system load average. Type: float | (gauge) |
| load1_per_core | One-minute load divided by logical CPU count. Type: float | (gauge) |
| load5 | Five-minute system load average. Type: float | (gauge) |
| load5_per_core | Five-minute load divided by logical CPU count. Type: float | (gauge) |
| load15 | Fifteen-minute system load average. Type: float | (gauge) |
| load15_per_core | Fifteen-minute load divided by logical CPU count. Type: float | (gauge) |
| n_cpus | Logical CPUs visible to the process. Type: int | (gauge) Unit: count |
| uptime | Host uptime. Type: int | (gauge) Unit: s |
| cpu_total_usage | Same value as the current cpu.usage_total; omitted when the CPU sample is invalid.Type: float | (gauge) Unit: percent |
| memory_usage | Same value as the current mem.used_percent; omitted when the memory sample is invalid.Type: float | (gauge) Unit: percent |
| process_count | Current count of process directories in /proc.Type: int | (gauge) Unit: count |
Object¶
HOST¶
| Tags & Fields | Description |
|---|---|
| host ( tag) |
Hostname. |
| name ( tag) |
Object name, currently identical to host. |
| os ( tag) |
Operating system, currently linux. |
| arch ( tag) |
CPU architecture, such as x86_64 or aarch64. |
| unicast_ip ( tag) |
Host unicast IP; omitted when unavailable. |
| message | JSON containing host CPU, memory, network, disk, and system metadata. Type: string |
| rs_datakit_ver | rsdatakit version. Type: string |
| cpu_usage | CPU utilization during the object interval. Type: float Unit: percent |
| num_cpu | Logical CPU count. Type: int Unit: count |
| mem_used_percent | Memory utilization. Type: float Unit: percent |
| load | Five-minute system load. Type: float |
| disk_total | Total capacity across configured mounts. Type: int Unit: digital,B |
| disk_used_percent | Aggregate utilization across configured mounts. Type: float Unit: percent |
| diskio_read_bytes_per_sec | Disk read throughput during the object interval. Type: int Unit: traffic,B/s |
| diskio_write_bytes_per_sec | Disk write throughput during the object interval. Type: int Unit: traffic,B/s |
| net_recv_bytes_per_sec | Network receive throughput during the object interval. Type: int Unit: traffic,B/s |
| net_send_bytes_per_sec | Network transmit throughput during the object interval. Type: int Unit: traffic,B/s |
| logging_level | Current RUST_LOG, or info when unset.Type: string |
| is_docker | 1 when rsdatakit runs in a container, otherwise 0.Type: int |
| start_time | Host boot time as Unix milliseconds; omitted when unavailable. Type: int Unit: ms |
Log collection¶
Logs are disabled by default. An empty paths array collects no files. Configure only the paths you
need instead of a broad global glob.
[logs]
# Enables file-log collection.
enabled = true
# Absolute path globs for log files to collect.
paths = ["/var/log/my-service/*.log"]
# Log data source name.
source = "my-service"
# service tag added to logs.
service = "my-service"
# Reports first-level members of a top-level JSON object as log fields.
json_as_fields = false
# Maximum number of active files read simultaneously.
max_files = 32
# Interval for rediscovering matching files in seconds.
discovery_secs = 5
# copytruncate log-rotation detection strategy.
copytruncate_mode = "auto"
# Local directory that stores file read positions. Must be absolute.
state_dir = "/var/lib/rsdatakit"
# Effective only when built with the journald feature and libsystemd is available.
journald_enabled = false
# Collects only this systemd unit. Leave empty for all accessible journal entries.
journald_unit = "my-service.service"
[logs.multiline]
# Continuation pattern. Leave empty to report one log point per line.
continuation_regex = "^\\s+"
# Maximum wait time for continuation lines in milliseconds.
flush_timeout_ms = 1000
# Maximum bytes in a merged log entry.
max_bytes = 262144
Log positions, the journald cursor, and WAL data are kept in the state directory. File logs resume from a confirmed position after restart. A position advances only after the data reaches WAL or is accepted by Dataway. Matched continuation lines are sent as a single multiline log.
json_as_fields is disabled by default. When enabled, a log whose top level is a JSON object
reports its first-level members as fields. Strings, booleans, int64 values, and finite float64
values retain their types; objects and arrays are encoded as compact JSON strings; null and
numbers outside the supported range are omitted. Invalid JSON, a non-object top level, or an object
with no usable fields retains the original message. JSON fields override collector fields with the
same name. Field names are normalized using Point rules and limited to 256 bytes, with at most 1024
fields per Point. The reserved keys time, source, date, and storage_index are renamed to their
json_* forms and do not change the Point timestamp, log source, or storage index. The feature can
also be enabled with RSDATAKIT_LOG_JSON_AS_FIELDS=true; the former json_extract setting and
RSDATAKIT_LOG_JSON_EXTRACT environment variable remain compatibility aliases.
journald_enabled = true adds systemd journal collection; it does not change whether file logs are
collected. Release packages include journald support. For a manual source build, use:
Log data¶
The log measurement is [logs].source. Kubernetes container logs commonly start with source
kubernetes; when metadata is matched, the measurement is changed to the container name.
| Tags & Fields | Description |
|---|---|
| host ( tag) |
Hostname of the collecting node. |
| service ( tag) |
[logs].service; journald prefers _SYSTEMD_UNIT. |
| filepath ( tag) |
Full file path; fixed to journald for journal records. |
| status ( tag) |
Currently fixed to info. Levels in the log body are not parsed automatically. |
| stream ( tag) |
stdout or stderr for CRI/Docker logs; absent for regular files and journald. |
| message | Original single-line or merged multiline content when json_as_fields is disabled or JSON conversion does not succeed.Type: string |
<json_key> |
First-level JSON field produced when json_as_fields is enabled and conversion succeeds.Type: string, bool, int, float |
Kubernetes container logs also receive the following tags when metadata is available:
| Tags & Fields | Description |
|---|---|
| cluster_name_k8s ( tag) |
Kubernetes cluster name. |
| node_name ( tag) |
Node hosting the Pod. |
| namespace ( tag) |
Pod namespace. |
| pod_namespace ( tag) |
DataKit-compatible Pod namespace field. |
| pod_name ( tag) |
Pod name. |
| pod_uid ( tag) |
Pod UID. |
| pod_ip ( tag) |
Pod IP when present. |
| container_name ( tag) |
Container name. |
| container_id ( tag) |
Container runtime ID without its runtime prefix, when it can be resolved. |
| image ( tag) |
Container image, when it can be resolved. |
| deployment ( tag) |
Deployment name when present. |
| daemonset ( tag) |
DaemonSet name when present. |
| statefulset ( tag) |
StatefulSet name when present. |
| replica_set ( tag) |
ReplicaSet name when present. |
| job ( tag) |
Job name when present. |
<label_key>( tag) |
Normalized key for a Pod label allowlisted in [kubernetes].label_tags (. becomes _; / is retained). |
OpenTelemetry Trace¶
OTLP is disabled by default. When enabled, rsdatakit receives OTLP Trace and forwards it to the tracing data category:
[otlp]
# Starts OTLP HTTP and gRPC receivers.
enabled = true
# OTLP/HTTP listen address.
http_addr = "127.0.0.1:4318"
# OTLP/gRPC listen address. Must differ from http_addr.
grpc_addr = "127.0.0.1:4317"
# Bearer token required for non-local listen addresses. It may be empty for local listening.
bearer_token = ""
# Maximum bytes per OTLP request.
max_request_bytes = 4194304
# Maximum number of concurrent OTLP requests.
max_concurrent_requests = 8
# Total memory budget in bytes for admitted OTLP requests.
max_inflight_bytes = 16777216
| Protocol | Address / path |
|---|---|
| OTLP/HTTP | http://<host>:4318/otel/v1/traces |
| OTLP/gRPC | <host>:4317, service opentelemetry.proto.collector.trace.v1.TraceService/Export |
| Health check | http://<health-host>:<health-port>/health; when OTLP is enabled, also http://<host>:4318/health |
When an HTTP or gRPC address is not loopback-only, bearer_token is mandatory. Clients use
Authorization: Bearer <token>. Only Trace is accepted today; OTLP Metrics and OTLP Logs are not
supported. /health can be served independently through agent.health_addr; disabling OTLP does
not bind ports 4317 or 4318.
The connection idle timeout is 30 seconds. HTTP headers and bodies, gRPC connection startup, and
gRPC request-body reception and decoding each have a 65-second absolute deadline. The gRPC body
deadline stops after the complete message and trailers are decoded; subsequent mapping, queue
admission, and Dataway/WAL receipt waiting have no whole-handler timeout, and an active request is
not interrupted by the connection idle timeout. A gRPC body that exceeds its receive deadline
returns DeadlineExceeded and releases the global admission budget.
Trace data¶
OTLP Spans are written to the tracing category with measurement opentelemetry. The start and
duration fields use microseconds; the Point timestamp is the Span start time in nanoseconds.
| Tags & Fields | Description |
|---|---|
| service ( tag) |
Service name. A Span database, RPC, or messaging system may override Resource service.name. |
| source ( tag) |
Fixed to opentelemetry. |
| span_type ( tag) |
Structural type in the Trace tree visible to the current request: entry, local, or exit. |
| span_kind ( tag) |
internal, server, client, producer, consumer, or unspecified. |
| source_type ( tag) |
db, message_queue, web, or custom. |
| status ( tag) |
ok, error, or info. |
| dk_fingerprint ( tag) |
Fingerprint used for DataKit/Guance Trace grouping compatibility. |
| host ( tag) |
Hostname of the rsdatakit instance receiving the Trace. Kubernetes node identity uses node_name. |
| base_service ( tag) |
Original service name when a database/RPC/messaging system overrides service. |
| collector_source_ip ( tag) |
OTLP client source IP when available. |
| trace_id | 32-character hexadecimal Trace ID. Type: string |
| span_id | 16-character hexadecimal Span ID. Type: string |
| parent_id | Parent Span ID; the string 0 for a root Span.Type: string |
| resource | Span name. Type: string |
| start | Span start as a Unix microsecond timestamp. Type: int Unit: us |
| duration | Span duration. Type: int Unit: us |
| runtime_id | Runtime ID when present. Type: string |
| message | Span JSON after core ID/time fields are removed, including attributes and events not mapped to top-level fields. Type: string |
| error_type | Exception type extracted from exception.type on an exception event.Type: string |
| error_message | Exception message extracted from exception.message on an exception event.Type: string |
| error_stack | Exception stack extracted from exception.stacktrace on an exception event.Type: string |
Common OTel Resource and Span attributes are flattened, for example db.system → db_system,
db.operation.name → db_operation, http.request.method → http_method,
http.response.status_code → http_status_code, rpc.system → rpc_system, and
messaging.system → messaging_system. String, boolean, integer, and floating-point values retain
their types; arrays and objects are encoded as JSON. At most 256 attributes are processed from each
attribute source. Attributes outside the semantic mapping allowlist do not become top-level fields,
but remain available in the message JSON.
Semantic attribute fields¶
The table below lists the current allowlisted OTel attribute mappings. Except for
http_status_code, a field preserves the input primitive type: string, bool, int, or float.
Arrays and key/value objects are JSON-encoded strings.
| Tags & Fields | Description |
|---|---|
| db_system | Input db.system or db.system.name.Type: string | bool | int | float |
| db_operation | Input db.operation or db.operation.name.Type: string | bool | int | float |
| db_operation_batch_size | Input db.operation.batch.size.Type: string | bool | int | float |
| db_name | Input db.name or db.namespace.Type: string | bool | int | float |
| db_statement | Input db.statement or db.query.text.Type: string | bool | int | float |
| db_collection | Input db.collection.name.Type: string | bool | int | float |
| db_host ( tag) |
For database spans, uses server.address, falling back to net.peer.name. |
| server_address | Input server.address.Type: string | bool | int | float |
| server_port | Input server.port.Type: string | bool | int | float |
| net_host_name | Input net.host.name.Type: string | bool | int | float |
| net_host_port | Input net.host.port.Type: string | bool | int | float |
| network_peer_address | Input network.peer.address.Type: string | bool | int | float |
| network_peer_port | Input network.peer.port.Type: string | bool | int | float |
| network_transport | Input network.transport.Type: string | bool | int | float |
| net_protocol_name | Input network.protocol.name.Type: string | bool | int | float |
| net_protocol_version | Input network.protocol.version.Type: string | bool | int | float |
| network_type | Input network.type.Type: string | bool | int | float |
| network_local_address | Input network.local.address.Type: string | bool | int | float |
| network_local_port | Input network.local.port.Type: string | bool | int | float |
| http_method | Input http.request.method or legacy http.method.Type: string | bool | int | float |
| http_status_code ( tag) |
Input http.response.status_code or legacy http.status_code; coerced to a string tag. |
| http_route | Input http.route.Type: string | bool | int | float |
| http_target | Input http.target.Type: string | bool | int | float |
| http_scheme | Input http.scheme.Type: string | bool | int | float |
| http_url | Input http.url.Type: string | bool | int | float |
| url_full | Input url.full.Type: string | bool | int | float |
| url_scheme | Input url.scheme.Type: string | bool | int | float |
| url_path | Input url.path.Type: string | bool | int | float |
| url_query | Input url.query.Type: string | bool | int | float |
| client_address | Input client.address.Type: string | bool | int | float |
| client_port | Input client.port.Type: string | bool | int | float |
| user_agent_original | Input user_agent.original.Type: string | bool | int | float |
| error_type | Input error.type; an exception event can also provide this field.Type: string | bool | int | float |
| messaging_system | Input messaging.system.Type: string | bool | int | float |
| messaging_operation | Input messaging.operation or messaging.operation.name.Type: string | bool | int | float |
| messaging_operation_type | Input messaging.operation.type.Type: string | bool | int | float |
| messaging_destination_name | Input messaging.destination.name.Type: string | bool | int | float |
| messaging_message_id | Input messaging.message.id.Type: string | bool | int | float |
| rpc_service | Input rpc.service.Type: string | bool | int | float |
| rpc_system | Input rpc.system or rpc.system.name.Type: string | bool | int | float |
| rpc_method | Input rpc.method.Type: string | bool | int | float |
| rpc_grpc_status_code | Input rpc.grpc.status_code.Type: string | bool | int | float |
| exception | Input exception.Type: string | bool | int | float |
| exception_type | Input exception.type.Type: string | bool | int | float |
| exception_message | Input exception.message.Type: string | bool | int | float |
| exception_stacktrace | Input exception.stacktrace.Type: string | bool | int | float |
| container_name | Input container.name. In Kubernetes mode this is also normalized into a tag of the same name.Type: string | bool | int | float |
| container_id | Input container.id. In Kubernetes mode this is also normalized into a tag of the same name.Type: string | bool | int | float |
| image | Input container.image.name. In Kubernetes mode this is also normalized into a tag of the same name.Type: string | bool | int | float |
| k8s_cluster_name | Input k8s.cluster.name.Type: string | bool | int | float |
| k8s_namespace_name | Input k8s.namespace.name.Type: string | bool | int | float |
| k8s_node_name | Input k8s.node.name.Type: string | bool | int | float |
| k8s_pod_name | Input k8s.pod.name.Type: string | bool | int | float |
| k8s_pod_uid | Input k8s.pod.uid.Type: string | bool | int | float |
| k8s_container_name | Input k8s.container.name.Type: string | bool | int | float |
| k8s_deployment_name | Input k8s.deployment.name.Type: string | bool | int | float |
| k8s_replicaset_name | Input k8s.replicaset.name.Type: string | bool | int | float |
| k8s_statefulset_name | Input k8s.statefulset.name.Type: string | bool | int | float |
| k8s_daemonset_name | Input k8s.daemonset.name.Type: string | bool | int | float |
| k8s_job_name | Input k8s.job.name.Type: string | bool | int | float |
| k8s_cronjob_name | Input k8s.cronjob.name.Type: string | bool | int | float |
| process_pid | Input process.pid.Type: string | bool | int | float |
| project | Input project.Type: string | bool | int | float |
| version | Input version.Type: string | bool | int | float |
| env | Input env.Type: string | bool | int | float |
| pod_name | Input compatibility attribute pod_name; in Kubernetes mode this is also normalized into a tag of the same name.Type: string | bool | int | float |
| pod_namespace | Input compatibility attribute pod_namespace; in Kubernetes mode this is also normalized into a tag of the same name.Type: string | bool | int | float |
| sdk_language | Input telemetry.sdk.language.Type: string | bool | int | float |
| sdk_name | Input telemetry.sdk.name.Type: string | bool | int | float |
| sdk_version | Input telemetry.sdk.version.Type: string | bool | int | float |
In Kubernetes mode, Trace data can receive the same cluster, Node, Pod, Container, workload, and allowlisted label tags as container logs. Identity supplied by OTel Resource data wins; missing values are filled from the local-node Pod cache.
Kubernetes collection¶
Enable Kubernetes mode with [kubernetes].enabled = true. The DaemonSet reads local Pod metadata,
Kubelet /stats/summary, and /var/log/pods on the node:
| Data | Output |
|---|---|
| Pod metrics | kube_pod |
| Container metrics | docker_containers |
| Pod objects | kubelet_pod |
| Container objects | docker_containers |
| Container logs | logging data enriched with Pod, container, image, namespace, and workload context. |
[kubernetes]
# Enables Kubernetes collection.
enabled = true
# Reports Pod and container metrics.
metrics_enabled = true
# Reports Pod and container objects.
objects_enabled = true
# Kubernetes cluster name.
cluster_name = "default"
# Local Pod metadata refresh interval in seconds.
refresh_secs = 60
# Pod and container object reporting interval in seconds.
object_interval_secs = 300
# Allowlist of Pod labels added to reported data.
label_tags = ["app.kubernetes.io/name"]
metrics_enabled and objects_enabled are independent. Metrics are collected every 60 seconds by
default. Objects are sent at startup and then every 5 minutes. label_tags is an allowlist of Pod
labels to add as tags, preventing uncontrolled cardinality.
rsdatakit accesses Kubelet over HTTPS with the automatically mounted ServiceAccount bearer token
and relies on the nodes/stats RBAC permission for authorization. To support node-local self-signed
certificates and clusters whose Kubelet certificate lacks a Node IP SAN, the Kubelet connection does
not validate the server certificate. The Kubernetes API uses a separate client and continues to
validate its server certificate with the ServiceAccount CA.
The supplied DaemonSet also mounts /var/log/pods, /var/lib/docker/containers, and
/var/lib/rsdatakit. Container logs come from local node files; rsdatakit does not call the
Kubernetes API for each log line. Pod metadata is added from a shared local-node cache.
Metrics¶
Optional fields absent from Kubelet Summary are not emitted. CPU, memory, file-system, and network
counters come from the local Kubelet /stats/summary; requests, limits, readiness, restarts, and
workload tags come from Pod API metadata.
kube_pod¶
One Point is emitted for every Pod on the local node.
| Tags & Fields | Description |
|---|---|
| cluster_name_k8s ( tag) |
Kubernetes cluster name. |
| node_name ( tag) |
Node hosting the Pod. |
| namespace ( tag) |
Pod namespace. |
| pod_namespace ( tag) |
DataKit-compatible Pod namespace field; emitted when Pod API metadata is available. |
| pod ( tag) |
Pod name from Kubelet Summary. |
| pod_name ( tag) |
Pod name. |
| uid ( tag) |
Pod UID from Kubelet Summary. |
| pod_uid ( tag) |
Pod UID. |
| pod_ip ( tag) |
Pod IP when metadata is available. |
| deployment ( tag) |
Deployment name, when the ReplicaSet owner can be resolved through pod-template-hash. |
| daemonset ( tag) |
DaemonSet name when present. |
| statefulset ( tag) |
StatefulSet name when present. |
| replica_set ( tag) |
ReplicaSet name when present. |
| job ( tag) |
Job name when present. |
<label_key>( tag) |
Normalized key for a Pod label allowlisted in [kubernetes].label_tags (. becomes _; / is retained). |
| cpu_usage_millicores | Current CPU usage. Type: float | (gauge) Unit: mCPU |
| cpu_usage | Current CPU usage; one core equals 100%, so it can exceed 100% across cores. Type: float | (gauge) Unit: percent |
| cpu_usage_base100 | CPU usage normalized by Node CPU capacity; emitted when Node capacity is available. Type: float | (gauge) Unit: percent |
| cpu_usage_core_nano_seconds | Cumulative CPU time. Type: int | (count) Unit: ns |
| cpu_limit_millicores | Sum of CPU limits for regular Pod containers; omitted when no limit is set. Type: float | (gauge) Unit: mCPU |
| cpu_request_millicores | Sum of CPU requests for regular Pod containers; omitted when no request is set. Type: float | (gauge) Unit: mCPU |
| cpu_usage_base_limit | CPU usage as a percentage of CPU limit; emitted when both are available. Type: float | (gauge) Unit: percent |
| cpu_usage_base_request | CPU usage as a percentage of CPU request; emitted when both are available. Type: float | (gauge) Unit: percent |
| mem_available | Currently available memory. Type: int | (gauge) Unit: digital,B |
| mem_usage | Current working-set memory. Type: int | (gauge) Unit: digital,B |
| mem_working_set | Current working-set memory; value equals mem_usage.Type: int | (gauge) Unit: digital,B |
| memory_usage_bytes | Compatibility field for current working-set memory; value equals mem_usage.Type: int | (gauge) Unit: digital,B |
| mem_rss | Resident memory. Type: int | (gauge) Unit: digital,B |
| mem_capacity | Node memory capacity; emitted when Node capacity is available. Type: int | (gauge) Unit: digital,B |
| memory_capacity | Compatibility field for Node memory capacity; value equals mem_capacity.Type: int | (gauge) Unit: digital,B |
| mem_used_percent | Working set as a percentage of Node memory capacity. Type: float | (gauge) Unit: percent |
| memory_used_percent | Compatibility field for mem_used_percent.Type: float | (gauge) Unit: percent |
| mem_limit | Sum of memory limits for regular Pod containers; omitted when no limit is set. Type: float | (gauge) Unit: digital,B |
| mem_request | Sum of memory requests for regular Pod containers; omitted when no request is set. Type: float | (gauge) Unit: digital,B |
| mem_used_percent_base_limit | Memory usage as a percentage of memory limit; emitted when both are available. Type: float | (gauge) Unit: percent |
| mem_used_percent_base_request | Memory usage as a percentage of memory request; emitted when both are available. Type: float | (gauge) Unit: percent |
| network_bytes_rcvd | Cumulative bytes received by the Pod. Type: int | (count) Unit: digital,B |
| network_bytes_sent | Cumulative bytes transmitted by the Pod. Type: int | (count) Unit: digital,B |
| network_errors_rcvd | Cumulative receive errors for the Pod. Type: int | (count) Unit: count |
| network_errors_sent | Cumulative transmit errors for the Pod. Type: int | (count) Unit: count |
| ephemeral_storage_available_bytes | Available Pod ephemeral storage. Type: int | (gauge) Unit: digital,B |
| ephemeral_storage_capacity_bytes | Total Pod ephemeral-storage capacity. Type: int | (gauge) Unit: digital,B |
| ephemeral_storage_used_bytes | Used Pod ephemeral storage. Type: int | (gauge) Unit: digital,B |
| ephemeral_storage_inodes | Total Pod ephemeral-storage inodes. Type: int | (gauge) Unit: count |
| ephemeral_storage_inodes_free | Free Pod ephemeral-storage inodes. Type: int | (gauge) Unit: count |
| ephemeral_storage_inodes_used | Used Pod ephemeral-storage inodes. Type: int | (gauge) Unit: count |
| ready | Regular containers currently in the running state. Type: float | (gauge) Unit: count |
| restarts | Maximum restart count among regular containers. Type: float | (gauge) Unit: count |
docker_containers (Kubernetes metric)¶
One Point is emitted for every container on the local node. Container network traffic is reported
at Pod level by kube_pod, so this measurement has no network fields.
| Tags & Fields | Description |
|---|---|
| cluster_name_k8s ( tag) |
Kubernetes cluster name. |
| host ( tag) |
Node hosting the container; equal to node_name. |
| node_name ( tag) |
Node hosting the container. |
| namespace ( tag) |
Pod namespace. |
| pod_namespace ( tag) |
DataKit-compatible Pod namespace field; emitted when metadata is available. |
| pod_name ( tag) |
Pod name. |
| pod_uid ( tag) |
Pod UID. |
| pod_ip ( tag) |
Pod IP when metadata is available. |
| container_name ( tag) |
Container name. |
| container_id ( tag) |
Container ID without the runtime prefix; emitted when metadata is available. |
| container_runtime ( tag) |
Runtime, for example containerd. |
| container_type ( tag) |
Fixed to kubernetes. |
| image ( tag) |
Container image. |
| state ( tag) |
Containers present in Kubelet Summary are currently marked running. |
| deployment ( tag) |
Deployment name when present. |
| daemonset ( tag) |
DaemonSet name when present. |
| statefulset ( tag) |
StatefulSet name when present. |
| replica_set ( tag) |
ReplicaSet name when present. |
| job ( tag) |
Job name when present. |
<label_key>( tag) |
Normalized key for a Pod label allowlisted in [kubernetes].label_tags. |
| cpu_usage_millicores | Current container CPU usage. Type: float | (gauge) Unit: mCPU |
| cpu_usage | Current container CPU usage; one core equals 100%. Type: float | (gauge) Unit: percent |
| cpu_usage_base100 | Container CPU usage normalized by Node CPU capacity; emitted when capacity is available. Type: float | (gauge) Unit: percent |
| cpu_usage_core_nano_seconds | Cumulative container CPU time. Type: int | (count) Unit: ns |
| cpu_limit_millicores | Container CPU limit; omitted when unset. Type: float | (gauge) Unit: mCPU |
| cpu_request_millicores | Container CPU request; omitted when unset. Type: float | (gauge) Unit: mCPU |
| cpu_usage_base_limit | Container CPU usage as a percentage of CPU limit. Type: float | (gauge) Unit: percent |
| cpu_usage_base_request | Container CPU usage as a percentage of CPU request. Type: float | (gauge) Unit: percent |
| mem_available | Current container available memory. Type: int | (gauge) Unit: digital,B |
| mem_usage | Container working-set memory. Type: int | (gauge) Unit: digital,B |
| mem_working_set | Container working-set memory; value equals mem_usage.Type: int | (gauge) Unit: digital,B |
| memory_usage_bytes | Compatibility field for mem_usage.Type: int | (gauge) Unit: digital,B |
| mem_rss | Container resident memory. Type: int | (gauge) Unit: digital,B |
| mem_capacity | Node memory capacity; emitted when capacity is available. Type: int | (gauge) Unit: digital,B |
| memory_capacity | Compatibility field for mem_capacity.Type: int | (gauge) Unit: digital,B |
| mem_used_percent | Container working set as a percentage of Node memory capacity. Type: float | (gauge) Unit: percent |
| memory_used_percent | Compatibility field for mem_used_percent.Type: float | (gauge) Unit: percent |
| mem_limit | Container memory limit; omitted when unset. Type: float | (gauge) Unit: digital,B |
| mem_request | Container memory request; omitted when unset. Type: float | (gauge) Unit: digital,B |
| mem_used_percent_base_limit | Container memory usage as a percentage of memory limit. Type: float | (gauge) Unit: percent |
| mem_used_percent_base_request | Container memory usage as a percentage of memory request. Type: float | (gauge) Unit: percent |
| ephemeral_storage_available_bytes | Available container rootfs capacity. Type: int | (gauge) Unit: digital,B |
| ephemeral_storage_capacity_bytes | Total container rootfs capacity. Type: int | (gauge) Unit: digital,B |
| ephemeral_storage_used_bytes | Used container rootfs capacity. Type: int | (gauge) Unit: digital,B |
| ephemeral_storage_inodes | Total container rootfs inodes. Type: int | (gauge) Unit: count |
| ephemeral_storage_inodes_free | Free container rootfs inodes. Type: int | (gauge) Unit: count |
| ephemeral_storage_inodes_used | Used container rootfs inodes. Type: int | (gauge) Unit: count |
| log_available_bytes | Available container log file-system capacity. Type: int | (gauge) Unit: digital,B |
| log_capacity_bytes | Total container log file-system capacity. Type: int | (gauge) Unit: digital,B |
| log_used_bytes | Used container log file-system capacity. Type: int | (gauge) Unit: digital,B |
| log_inodes | Total container log file-system inodes. Type: int | (gauge) Unit: count |
| log_inodes_free | Free container log file-system inodes. Type: int | (gauge) Unit: count |
| log_inodes_used | Used container log file-system inodes. Type: int | (gauge) Unit: count |
Objects¶
Objects use DataKit-compatible classes. The object message is a JSON snapshot of current fields.
When the Kubelet Summary is available in the cycle, the resource fields for the matching Pod or
container are also carried into the object and are listed explicitly below.
kubelet_pod object¶
| Tags & Fields | Description |
|---|---|
| name ( tag) |
Object name; fixed to the Pod UID. |
| uid ( tag) |
Pod UID. |
| pod_name ( tag) |
Pod name. |
| namespace ( tag) |
Pod namespace. |
| pod_namespace ( tag) |
DataKit-compatible Pod namespace field. |
| cluster_name_k8s ( tag) |
Kubernetes cluster name. |
| node_name ( tag) |
Node hosting the Pod; omitted before scheduling. |
| host ( tag) |
Node hosting the Pod; equal to node_name. |
| pod ( tag) |
Pod name from Kubelet Summary; emitted when Summary is available. |
| phase ( tag) |
Pod phase, such as Running or Pending. |
| status ( tag) |
Current Pod status; uses a container waiting reason when available, otherwise Pod phase. |
| pod_ip ( tag) |
Pod IP when present. |
| qos_class ( tag) |
Pod QoS class when present. |
| workload_name ( tag) |
Normalized workload name; Deployment takes precedence, otherwise the first recognized owner. |
| deployment ( tag) |
Deployment name when present. |
| daemonset ( tag) |
DaemonSet name when present. |
| statefulset ( tag) |
StatefulSet name when present. |
| replica_set ( tag) |
ReplicaSet name when present. |
| job ( tag) |
Job name when present. |
<label_key>( tag) |
Normalized key for a Pod label allowlisted in [kubernetes].label_tags. |
| available | Total regular containers in the Pod. Type: int Unit: count |
| ready | Regular containers currently in the running state. Type: int Unit: count |
| restarts | Maximum restart count among regular containers. Type: int Unit: count |
| age | Seconds since Pod creation. Type: int Unit: s |
| cpu_usage_millicores | Current Pod CPU usage; emitted when Kubelet Summary is available. Type: float Unit: mCPU |
| cpu_usage | Current Pod CPU usage; one core equals 100%. Type: float Unit: percent |
| cpu_usage_base100 | Pod CPU usage normalized by Node CPU capacity. Type: float Unit: percent |
| cpu_usage_core_nano_seconds | Cumulative Pod CPU time. Type: int Unit: ns |
| cpu_limit_millicores | Sum of CPU limits for regular Pod containers. Type: float Unit: mCPU |
| cpu_request_millicores | Sum of CPU requests for regular Pod containers. Type: float Unit: mCPU |
| cpu_usage_base_limit | Pod CPU usage as a percentage of CPU limit. Type: float Unit: percent |
| cpu_usage_base_request | Pod CPU usage as a percentage of CPU request. Type: float Unit: percent |
| mem_available | Current Pod available memory. Type: int Unit: digital,B |
| mem_usage | Pod working-set memory. Type: int Unit: digital,B |
| mem_working_set | Pod working-set memory; value equals mem_usage.Type: int Unit: digital,B |
| memory_usage_bytes | Compatibility field for mem_usage.Type: int Unit: digital,B |
| mem_rss | Pod resident memory. Type: int Unit: digital,B |
| mem_capacity | Node memory capacity. Type: int Unit: digital,B |
| memory_capacity | Compatibility field for mem_capacity.Type: int Unit: digital,B |
| mem_used_percent | Pod working set as a percentage of Node memory capacity. Type: float Unit: percent |
| memory_used_percent | Compatibility field for mem_used_percent.Type: float Unit: percent |
| mem_limit | Sum of memory limits for regular Pod containers. Type: float Unit: digital,B |
| mem_request | Sum of memory requests for regular Pod containers. Type: float Unit: digital,B |
| mem_used_percent_base_limit | Pod memory usage as a percentage of memory limit. Type: float Unit: percent |
| mem_used_percent_base_request | Pod memory usage as a percentage of memory request. Type: float Unit: percent |
| network_bytes_rcvd | Cumulative bytes received by the Pod. Type: int Unit: digital,B |
| network_bytes_sent | Cumulative bytes transmitted by the Pod. Type: int Unit: digital,B |
| network_errors_rcvd | Cumulative receive errors for the Pod. Type: int Unit: count |
| network_errors_sent | Cumulative transmit errors for the Pod. Type: int Unit: count |
| ephemeral_storage_available_bytes | Available Pod ephemeral storage. Type: int Unit: digital,B |
| ephemeral_storage_capacity_bytes | Total Pod ephemeral-storage capacity. Type: int Unit: digital,B |
| ephemeral_storage_used_bytes | Used Pod ephemeral storage. Type: int Unit: digital,B |
| ephemeral_storage_inodes | Total Pod ephemeral-storage inodes. Type: int Unit: count |
| ephemeral_storage_inodes_free | Free Pod ephemeral-storage inodes. Type: int Unit: count |
| ephemeral_storage_inodes_used | Used Pod ephemeral-storage inodes. Type: int Unit: count |
| message | Object JSON snapshot. Type: string |
docker_containers object¶
| Tags & Fields | Description |
|---|---|
| name ( tag) |
Object name; fixed to the container ID. |
| container_id ( tag) |
Container ID without the runtime prefix. |
| container_name ( tag) |
Container name. |
| container_runtime ( tag) |
Container runtime, for example containerd; emitted when available. |
| image ( tag) |
Container image; emitted when available. |
| container_type ( tag) |
Fixed to kubernetes. |
| state ( tag) |
Currently fixed to running. |
| cluster_name_k8s ( tag) |
Kubernetes cluster name. |
| host ( tag) |
Node hosting the container. |
| node_name ( tag) |
Node hosting the container. |
| namespace ( tag) |
Pod namespace. |
| pod_namespace ( tag) |
DataKit-compatible Pod namespace field; retained when present on the source metric. |
| pod_name ( tag) |
Pod name. |
| pod_uid ( tag) |
Pod UID. |
| pod_ip ( tag) |
Pod IP; retained when present on the source metric. |
| workload_name ( tag) |
Normalized workload name when present. |
| deployment ( tag) |
Deployment name when present. |
| daemonset ( tag) |
DaemonSet name when present. |
| statefulset ( tag) |
StatefulSet name when present. |
| replica_set ( tag) |
ReplicaSet name when present. |
| job ( tag) |
Job name when present. |
<label_key>( tag) |
Normalized key for a Pod label allowlisted in [kubernetes].label_tags. |
| age | Seconds since container start when the start time is available. Type: int Unit: s |
| cpu_usage_millicores | Current container CPU usage. Type: float Unit: mCPU |
| cpu_usage | Current container CPU usage. Type: float Unit: percent |
| cpu_usage_base100 | Container CPU usage normalized by Node CPU capacity. Type: float Unit: percent |
| cpu_usage_core_nano_seconds | Cumulative container CPU time. Type: int Unit: ns |
| cpu_limit_millicores | Container CPU limit. Type: float Unit: mCPU |
| cpu_request_millicores | Container CPU request. Type: float Unit: mCPU |
| cpu_usage_base_limit | Container CPU usage as a percentage of CPU limit. Type: float Unit: percent |
| cpu_usage_base_request | Container CPU usage as a percentage of CPU request. Type: float Unit: percent |
| mem_available | Current container available memory. Type: int Unit: digital,B |
| mem_usage | Container working-set memory. Type: int Unit: digital,B |
| mem_working_set | Container working-set memory; value equals mem_usage.Type: int Unit: digital,B |
| memory_usage_bytes | Compatibility field for mem_usage.Type: int Unit: digital,B |
| mem_rss | Container resident memory. Type: int Unit: digital,B |
| mem_capacity | Node memory capacity. Type: int Unit: digital,B |
| memory_capacity | Compatibility field for mem_capacity.Type: int Unit: digital,B |
| mem_used_percent | Container working set as a percentage of Node memory capacity. Type: float Unit: percent |
| memory_used_percent | Compatibility field for mem_used_percent.Type: float Unit: percent |
| mem_limit | Container memory limit. Type: float Unit: digital,B |
| mem_request | Container memory request. Type: float Unit: digital,B |
| mem_used_percent_base_limit | Container memory usage as a percentage of memory limit. Type: float Unit: percent |
| mem_used_percent_base_request | Container memory usage as a percentage of memory request. Type: float Unit: percent |
| ephemeral_storage_available_bytes | Available container rootfs capacity. Type: int Unit: digital,B |
| ephemeral_storage_capacity_bytes | Total container rootfs capacity. Type: int Unit: digital,B |
| ephemeral_storage_used_bytes | Used container rootfs capacity. Type: int Unit: digital,B |
| ephemeral_storage_inodes | Total container rootfs inodes. Type: int Unit: count |
| ephemeral_storage_inodes_free | Free container rootfs inodes. Type: int Unit: count |
| ephemeral_storage_inodes_used | Used container rootfs inodes. Type: int Unit: count |
| log_available_bytes | Available container log file-system capacity. Type: int Unit: digital,B |
| log_capacity_bytes | Total container log file-system capacity. Type: int Unit: digital,B |
| log_used_bytes | Used container log file-system capacity. Type: int Unit: digital,B |
| log_inodes | Total container log file-system inodes. Type: int Unit: count |
| log_inodes_free | Free container log file-system inodes. Type: int Unit: count |
| log_inodes_used | Used container log file-system inodes. Type: int Unit: count |
| message | Object JSON snapshot. Type: string |
Prometheus collection¶
Prometheus scraping is part of Kubernetes mode. It is disabled in the standalone binary configuration and enabled in the supplied DaemonSet example:
[kubernetes.prometheus]
# Enables local Prometheus target discovery and scraping.
enabled = true
# Scrape interval per target in seconds.
scrape_interval_secs = 30
# Timeout per scrape in seconds.
scrape_timeout_secs = 10
# Keeps the full exporter metric name as the field name.
keep_exist_metric_name = true
# Discovers Pods annotated with prometheus.io/scrape.
discover_pod_annotations = true
# Discovers Services annotated with prometheus.io/scrape.
discover_service_annotations = true
# Discovers Prometheus Operator PodMonitors.
discover_pod_monitors = true
# Discovers Prometheus Operator ServiceMonitors.
discover_service_monitors = true
Trusted explicit targets can be configured in addition to discovery:
[[kubernetes.prometheus.instances]]
# Target source type.
role = "pod" # node | pod | service | endpoints
# Namespaces containing the targets.
namespaces = ["default"]
# Kubernetes label selector.
selector = "app=nginx"
# Scrape scheme.
scheme = "http"
# Numeric or named port.
port = "metrics"
# HTTP metrics path.
path = "/metrics"
# Measurement name. Derived automatically when empty.
measurement = ""
# Tags added to all metrics from this target.
tags = { team = "platform" }
Targets can be discovered through:
- Pod/Service annotations such as
prometheus.io/scrape,port,scheme, andpath; - Prometheus Operator PodMonitor and ServiceMonitor resources;
- trusted static
node,pod,service, andendpointsinstances.
Only targets confirmed to belong to the local node are scraped, avoiding duplicate cluster-wide
scraping by DaemonSet replicas. Measurements are derived from exporter metric names or an explicit
measurement setting. collector.up reports the scrape result of each target.
Disable unneeded discover_* options. When Service annotation and ServiceMonitor discovery are off
and no explicit service or endpoints instance is configured, rsdatakit does not subscribe to
cluster-wide Service or EndpointSlice resources.
Metric conversion rules¶
Exporter measurements and fields are generated dynamically from metric names and cannot be listed like fixed host metrics:
| Configuration / input | Output rule |
|---|---|
No explicit measurement, metric name contains _ |
Text before the first _ becomes the measurement. For example, http_requests_total → measurement http. |
keep_exist_metric_name = true |
The field retains the full available metric name. Its exact prefix depends on whether a measurement is explicitly configured. |
keep_exist_metric_name = false |
Without an explicit measurement, the first prefix is removed: http_requests_total → measurement http, field requests_total. |
Explicit measurement |
All samples use that measurement; the field follows the preservation rule above. |
| Prometheus label | Converted to a tag. Kubernetes identity tags from the target take precedence over conflicting exporter labels. |
| Counter | Emitted as a cumulative sum; _total is appended when missing. |
| Histogram / Summary | Expanded into _sum, _count, _bucket, and le/quantile tags. |
| Info / StateSet | Info becomes a gauge with value 1; StateSet emits 0 or 1 for each state. |
Every scrape also emits collector status:
collector¶
| Tags & Fields | Description |
|---|---|
| host ( tag) |
Non-loopback target IP, or an empty string when it cannot be determined. |
| job ( tag) |
Discovered or explicitly configured Prometheus job. |
| Target tags ( tag) |
Pod, Service, Node, namespace, instance, and other tags attached to the target. |
| up | 1 when the scrape and parse succeed, otherwise 0.Type: float | (gauge) |
Run and verify¶
Run in the foreground:
After systemd installation:
After rsdatakit started appears in the startup log, verify these data sets in the workspace:
| Feature | Verification |
|---|---|
| Host | cpu, mem, disk, diskio, net, and system metrics plus the HOST object. |
| Logs | The source configured by [logs].source, collector tags, and either the original message or JSON fields produced by json_as_fields. |
| Trace | Services, Span hierarchy, and Trace IDs in the opentelemetry source. |
| Kubernetes | kube_pod and docker_containers metrics plus Pod/container objects. |
| Prometheus | Exporter metrics and collector.up. |
After configuring the standalone health address or enabling OTLP HTTP, inspect health with, for example:
degraded indicates a current Dataway, WAL, or collector fault. HTTP 503 indicates unhealthy
queue/WAL pressure or a stopped background task.
Notes¶
- Logs and traces enter WAL and retry after network errors, HTTP 5xx, or HTTP 429. Other 4xx responses are not retried. Metrics and objects are periodic snapshots and are not stored in WAL.
- Size
wal.max_bytesfor the log/Trace volume and acceptable Dataway outage window. - Inject Dataway and OTLP tokens through a Secret or restricted configuration file; never commit them.
- Allowlist only required Pod labels in
kubernetes.label_tagsto avoid high-cardinality tags. RUST_LOG=rsdatakit=debugproduces substantial logs and should be used only for short diagnostics.