Skip to content

dfa1/ebpf-sensor

Repository files navigation

ebpf-sensor

eBPF event pipeline with pluggable sources and sinks.

Requirements

  • Python 3.12+
  • uv

Setup

uv sync

Usage

from sources.ebpf import EBPFEventSource
from sinks.kafka import KafkaEventSink

source = EBPFEventSource(bpf_prog=open("prog.c").read())
sink = KafkaEventSink(bootstrap_servers="localhost:9092", topic="events")
for event in source.events():
    sink.write(event)

Development

uv run python -m pytest                                 # tests
uv run python -m mypy sources/ sinks/ event.py tests/  # type check
uv run ruff format .                                   # format
uv run ruff check .                                    # lint

License

MIT

About

a toy sensor based on ebpf

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages