Part 2: eBPF Map Metrics Prometheus Exporter

Observability of eBPF Maps and Prometheus

TJ. Podobnik, @dorkamotorka
eBPFChirp Blog
Published in
5 min readAug 8, 2024

--

This post follows up on my previous attempt to develop a standalone eBPF Map Metrics exporter, which initially failed.

Fortunately, after sharing my struggles, Anton from Isovalent reached out to me with a recent patch to the Linux Kernel that addressed my issues.

In this blog post, we’ll discuss eBPF Iterators and the solution for exporting eBPF Map metrics without altering your application stack.

eBPF Iterators

The advice Anton gave me revolved around using eBPF Iterators. To be quite honest with you, I had seen this feature in the past but didn’t have time to delve deeper into it, so it was just another thing that ended up on my (already long) TODO list.

So, what is an eBPF Iterator?

An eBPF Iterator is a type of eBPF program that allows users to iterate over specific types of kernel data structures by defining callback functions that are executed for every entry in various kernel structures.

For instance, users can create a BPF iterator to traverse all tasks on the system and report the total CPU runtime used by…

--

--

eBPFChirp Blog
eBPFChirp Blog

Published in eBPFChirp Blog

Explore the cutting-edge world of eBPF in our Medium publication, where we dive deep into its capabilities, advancements, and practical applications. From kernel innovations to complex network monitoring, discover how eBPF is transforming the tech landscape.

TJ. Podobnik, @dorkamotorka
TJ. Podobnik, @dorkamotorka

Written by TJ. Podobnik, @dorkamotorka

SRE at Prewave | Technical Writer-Editor | Researcher at the University of Ljubljana | Linkedin: https://www.linkedin.com/in/teodor-janez-podobnik/

No responses yet