{"id":16895880,"url":"https://github.com/dswarbrick/ebpf_exporter","last_synced_at":"2025-06-24T08:03:22.230Z","repository":{"id":154338743,"uuid":"115930276","full_name":"dswarbrick/ebpf_exporter","owner":"dswarbrick","description":"A Prometheus exporter which uses eBPF to measure block IO request latency / size","archived":false,"fork":false,"pushed_at":"2023-10-11T09:58:48.000Z","size":194,"stargazers_count":75,"open_issues_count":1,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-02T04:23:49.714Z","etag":null,"topics":["ebpf","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dswarbrick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-01T16:12:00.000Z","updated_at":"2025-01-07T02:57:22.000Z","dependencies_parsed_at":"2023-11-10T12:19:30.698Z","dependency_job_id":null,"html_url":"https://github.com/dswarbrick/ebpf_exporter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dswarbrick/ebpf_exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dswarbrick%2Febpf_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dswarbrick%2Febpf_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dswarbrick%2Febpf_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dswarbrick%2Febpf_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dswarbrick","download_url":"https://codeload.github.com/dswarbrick/ebpf_exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dswarbrick%2Febpf_exporter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261632033,"owners_count":23187268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ebpf","prometheus","prometheus-exporter"],"created_at":"2024-10-13T17:26:45.064Z","updated_at":"2025-06-24T08:03:22.203Z","avatar_url":"https://github.com/dswarbrick.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ebpf_exporter\n\nebpf_exporter is an experimental Prometheus exporter which uses eBPF kprobes to efficiently record\na histogram of Linux bio request latencies and sizes.\n\nThe included BPF program is loosely based on the examples shipped with [IO Visor's BPF Compiler\nCollection](https://github.com/iovisor/bcc), specifically the bitehist and disksnoop examples.\n\n## Sample Output\n\nLinux bio request latencies for each block device are recorded in log2 buckets separately for each\nrequest operation type (read, write, flush, discard, etc), in microseconds. This should cover use\ncases ranging from high speed flash-based devices, to legacy HDD devices.\n\n```\n# HELP ebpf_bio_req_latency A histogram of bio request latencies in microseconds.\n# TYPE ebpf_bio_req_latency histogram\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"1\"} 0\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"2\"} 0\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"4\"} 0\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"8\"} 0\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"16\"} 0\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"32\"} 0\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"64\"} 40\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"128\"} 219\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"256\"} 335\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"512\"} 363\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"1024\"} 428\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"2048\"} 1649\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"4096\"} 3498\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"8192\"} 3614\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"16384\"} 3760\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"32768\"} 3777\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"65536\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"131072\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"262144\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"524288\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"1.048576e+06\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"2.097152e+06\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"4.194304e+06\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"8.388608e+06\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"1.6777216e+07\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"3.3554432e+07\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"6.7108864e+07\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"1.34217728e+08\"} 3780\nebpf_bio_req_latency_bucket{device=\"sda\",operation=\"write\",le=\"+Inf\"} 3780\nebpf_bio_req_latency_sum{device=\"sda\",operation=\"write\"} 1.4306176e+07\nebpf_bio_req_latency_count{device=\"sda\",operation=\"write\"} 3780\n```\n\nRequest sizes (in KiB) are also recorded in log2 buckets for each device:\n\n```\n# HELP ebpf_bio_req_size A histogram of bio request sizes in KiB.\n# TYPE ebpf_bio_req_size histogram\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"1\"} 8\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"2\"} 8\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"4\"} 2450\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"8\"} 3050\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"16\"} 3347\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"32\"} 3602\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"64\"} 3698\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"128\"} 3714\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"256\"} 3732\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"512\"} 3777\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"1024\"} 3780\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"2048\"} 3780\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"4096\"} 3780\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"8192\"} 3780\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"16384\"} 3780\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"32768\"} 3780\nebpf_bio_req_size_bucket{device=\"sda\",operation=\"write\",le=\"+Inf\"} 3780\nebpf_bio_req_size_sum{device=\"sda\",operation=\"write\"} 66400\nebpf_bio_req_size_count{device=\"sda\",operation=\"write\"} 3780\n```\n\nNote that histograms will only be exposed for devices that have actually performed IO since the BPF\nprogram was loaded. If a device is only performing writes, no histogram will be present for reads,\nand vice versa.\n\n## Grafana Panel Samples\n\nGrafana 5.1 and later supports Prometheus histograms, either as bar / line / point graphs, or as\nheatmaps. See Grafana's [heatmap panel](http://docs.grafana.org/features/panels/heatmap/) guide for\nmore information.\n\n![IO request latency histogram](img/io-req-latency-hist.png)\n\n![IO request latency heatmap](img/io-req-latency-heatmap.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdswarbrick%2Febpf_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdswarbrick%2Febpf_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdswarbrick%2Febpf_exporter/lists"}