{"id":15056941,"url":"https://github.com/4rivappa/kube-trace-nfs","last_synced_at":"2025-04-10T05:05:53.994Z","repository":{"id":242223843,"uuid":"808664586","full_name":"4rivappa/kube-trace-nfs","owner":"4rivappa","description":"eBPF-Based NFS Telemetry Exporter for Kubernetes","archived":false,"fork":false,"pushed_at":"2024-06-08T09:07:50.000Z","size":25,"stargazers_count":37,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T05:05:51.950Z","etag":null,"topics":["ebpf","efs","kubernetes","nfs","prometheus","telemetry"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4rivappa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-05-31T14:45:38.000Z","updated_at":"2025-03-06T17:29:12.000Z","dependencies_parsed_at":"2024-06-08T09:51:41.747Z","dependency_job_id":null,"html_url":"https://github.com/4rivappa/kube-trace-nfs","commit_stats":null,"previous_names":["4rivappa/kube-trace-nfs"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rivappa%2Fkube-trace-nfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rivappa%2Fkube-trace-nfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rivappa%2Fkube-trace-nfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rivappa%2Fkube-trace-nfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4rivappa","download_url":"https://codeload.github.com/4rivappa/kube-trace-nfs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161273,"owners_count":21057555,"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","efs","kubernetes","nfs","prometheus","telemetry"],"created_at":"2024-09-24T21:59:04.911Z","updated_at":"2025-04-10T05:05:53.962Z","avatar_url":"https://github.com/4rivappa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kube Trace NFS\n\n![image](https://github.com/4rivappa/kube-trace-nfs/assets/114223788/3e67ef41-13ca-424a-8c1c-e5fb0cc7ee26)\n\n## Overview\n\nKube Trace NFS is designed to **observe NFS connections in a Kubernetes cluster** by collecting telemetry data from a node-level **eBPF program**, utilizing the BCC tool. Inspired by the `nfsslower` tool and other **BCC utilities**, this application focuses specifically on NFS operations such as **reads, writes, opens, and getattrs**.\n\nCurrently, the application collects **node-level metrics**, with **pod-level metrics** and the ranking of the **most accessed files** planned for upcoming versions. Collected data can be **exported to monitoring tools** like Prometheus and **visualized on platforms** such as Grafana. This comprehensive data provides valuable insights into how NFS traffic is distributed across the cluster.\n\n## Motivation\n\nMany cloud providers offer **storage through NFS protocol**, which can be attached to **Kubernetes clusters via CSI** (Container Storage Interface). However, the monitoring provided by storage providers often **aggregates data for all NFS client connections**. This aggregation makes it **difficult to isolate and monitor specific connections** and their operations such as reads, writes, and getattrs to the NFS server. This project **addresses this challenge** by offering detailed **telemetry data of NFS requests** from clients to the server, facilitating both node-level and pod-level analysis. Leveraging Prometheus and Grafana, this data **enables comprehensive analysis of NFS traffic**, empowering users to gain valuable insights into their cluster's NFS interactions.\n\n## Features\n\n- **[eBPF](https://ebpf.io/what-is-ebpf#what-is-ebpf)-based** efficient and low-overhead monitoring\n- Provide **byte throughput** metrics for read/write operations\n- **Latency and occurrence rate** of read, write, open, and getattr operations\n- Potential for metrics related to **IOPS and file-level access**\n\n## Architecture\n\n![image](https://github.com/4rivappa/kube-trace-nfs/assets/114223788/7f87e006-0965-4363-986e-2fddd77f8304)\n\n\u003e K (Kernel): kprobe, eBPF program\n\n\u003e U (User space): kube-trace-nfs, nfs-client, other pods\n\nThe `nfs client` establishes a connection with the `nfs server` to furnish storage for pods, a process routed through kernel programs. `kube-trace-nfs` attaches `eBPF program` to nfs `kprobes` to capture metrics concerning events occurring within nfs clients. These metrics are stored in **eBPF maps** and undergo processing for event analysis. Events involving read, write, open, and getattr operations are forwarded to the user space component `kube-trace-nfs`. Subsequently, these values are exported to **Prometheus**, from where the data can be leveraged in various visualization tools such as **Grafana**.\n\n## Quick Installation\n\nKube Trace NFS can be installed from GHCR using Helm\n\n```bash\nVERSION=${$(curl -sL https://api.github.com/repos/4rivappa/kube-trace-nfs/releases/latest | jq -r .name)#v}\nhelm install kube-trace-nfs oci://ghcr.io/4rivappa/kube-trace-nfs --version $VERSION\n```\n\nAfter Helm install, you can access `nfs_read_bytes`, `nfs_write_bytes` metrics in prometheus\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4rivappa%2Fkube-trace-nfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4rivappa%2Fkube-trace-nfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4rivappa%2Fkube-trace-nfs/lists"}