Crates.io | bpf-metrics-exporter |
lib.rs | bpf-metrics-exporter |
version | 0.5.4 |
source | src |
created_at | 2024-04-10 17:19:42.135641 |
updated_at | 2024-10-17 17:06:42.342584 |
description | Binary for exporting eBPF subsystem metrics via prometheus |
homepage | https://bpfman.io |
repository | https://github.com/bpfman/bpfman |
max_upload_size | |
id | 1203795 |
size | 1,703,087 |
Exports metrics from the kernel's BPF subsystem to OpenTelmetry. These can later be enriched with other metrics from the system, for example, to correlate process IDs -> containers -> k8s pods.
./bpf-metrics-exporter --otlp-grpc localhost:4317
The following metrics are currently exported, this list will continue to expand:
bpf_program_info
: Information on each loaded BPF Program
id
: The ID of the BPF programname
: The name of the BPF programtype
: The type of the BPF program as a readable stringtag
: The tag of the BPF programgpl_compatible
: Whether the BPF program is GPL compatibleload_time
: The time the BPF program was loadedbpf_map_info
: Information of each loaded BPF Map
id
: The ID of the BPF mapname
: The name of the BPF maptype
: The type of the BPF map as an u32
which corresponds to the following kernel enumerationkey_size
: The key size in bytes for the BPF mapvalue_size
: The value size for the BPF mapmax_entries
: The maximum number of entries for the BPF map.flags
: Loadtime specific flags for the BPF mapbpf_link_info
: Information on each of the loaded BPF Link
id
: The ID of the bpf Linkprog_id
: The Program ID of the BPF program which is using the Link.type
: The BPF Link type as a u32
which corresponds to the following kernel enumerationbpf_program_load_time
: The standard UTC time the program was loaded in seconds
id
: The ID of the BPF programname
: The name of the BPF programtype
: The type of the BPF program as a readable stringNote: All counters will have the suffix _total
appended.
bpf_program_size_jitted_bytes
: The size in bytes of the program's JIT-compiled machine code.
id
: The ID of the BPF programname
: The name of the BPF programtype
: The type of the BPF program as a readable stringbpf_program_size_translated_bytes
: The size of the BPF program in bytes.
id
: The ID of the BPF programname
: The name of the BPF programtype
: The type of the BPF program as a readable stringbpf_program_mem_bytes
: The amount of memory used by the BPF program in bytes.
id
: The ID of the BPF programname
: The name of the BPF programtype
: The type of the BPF program as a readable stringbpf_program_verified_instructions
: The number of instructions in the BPF program.
id
: The ID of the BPF programname
: The name of the BPF programtype
: The type of the BPF program as a readable stringbpf_map_key_size
: The size of the BPF map key
id
: The ID of the BPF mapname
: The name of the BPF maptype
: The type of the BPF map as an u32
which corresponds to the following kernel enumerationbpf_map_value_size
: The size of the BPF map value
id
: The ID of the BPF mapname
: The name of the BPF maptype
: The type of the BPF map as an u32
which corresponds to the following kernel enumerationbpf_map_max_entries
: The maximum number of entries allowed for the BPF map
id
: The ID of the BPF mapname
: The name of the BPF maptype
: The type of the BPF map as an u32
which corresponds to the following kernel enumerationYou'll need a Grafana stack set up. You can quickly deploy one using:
podman play kube metrics-stack.yaml
Then, you can deploy the exporter:
sudo ./target/debug/bpf-metrics-exporter
You can log into grafana at http://localhost:3000/
using the default user:password
admin:admin
.
From there simply select the default dashboard titled eBPF Subsystem Metrics
:
In order to clean everything up simply exit the bpf-metrics-exporter process with
ctrl+c
and run:
podman kube down metrics-stack.yaml