[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F5ZAF83G5A70NF66QBYKEB":3,"skill-same:01M6F5ZAF83G5A70NF66QBYKEB":79},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":29,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":6,"ownerHtmlUrl":57,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":58,"install":59,"resources":72},"01M6F5ZAF83G5A70NF66QBYKEB","ebpf-observability",null,"Use eBPF for deep kernel-level observability — trace syscalls, network flows, and application behavior without code changes using Cilium, Tetragon, and bpftrace.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-ebpf-observability\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"ebpf observability","ebpf","observability","only","2026","flows","relevant","scripts","critical","bpftrace","deep","main","community","security","access","devops-security","kubectl","network","ci","git","code","2026-11-10 10:12:30",false,"---\nname: ebpf-observability\ndescription: Use eBPF for deep kernel-level observability — trace syscalls, network\n  flows, and application behavior without code changes using Cilium, Tetragon, and\n  bpftrace.\ncategory: devops\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant platform CLIs (kubectl, helm, terraform, git,\n  CI runners) and authorized access to the target environment. Docs-only; helper scripts\n  and templates not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# eBPF Observability\n\neBPF (extended Berkeley Packet Filter) allows you to run sandboxed programs in the Linux kernel without modifying kernel source code or loading kernel modules. This skill covers using eBPF for deep observability, network monitoring, and security enforcement across cloud-native infrastructure.\n\n---\n\n## 2. Prerequisites\n\n### Kernel Version Requirements\n\n| Feature                  | Minimum Kernel | Recommended Kernel |\n|--------------------------|----------------|--------------------|\n| Basic BPF maps & probes  | 4.9            | 5.10+              |\n| BPF CO-RE (BTF support)  | 5.2            | 5.10+              |\n| BPF ring buffer          | 5.8            | 5.10+              |\n| BPF LSM hooks            | 5.7            | 5.15+              |\n| Cilium full features     | 4.19           | 5.10+              |\n| Tetragon                 | 4.19           | 5.13+              |\n\n### Verify Kernel Support\n\n```bash\n# Check kernel version\nuname -r\n\n# Verify BTF (BPF Type Format) is enabled -- required for CO-RE\nls \u002Fsys\u002Fkernel\u002Fbtf\u002Fvmlinux\n\n# Check BPF filesystem is mounted\nmount | grep bpf\n\n# If not mounted, mount it\nsudo mount -t bpf bpf \u002Fsys\u002Ffs\u002Fbpf\n\n# Verify BPF JIT is enabled\ncat \u002Fproc\u002Fsys\u002Fnet\u002Fcore\u002Fbpf_jit_enable\n# Should return 1; if not:\nsudo sysctl net.core.bpf_jit_enable=1\n```\n\n### Install Toolchain\n\n```bash\n# Ubuntu\u002FDebian -- install bpftrace, bcc tools, and libbpf\nsudo apt-get update\nsudo apt-get install -y bpftrace bpfcc-tools libbpf-dev linux-headers-$(uname -r)\n\n# Fedora\u002FRHEL\nsudo dnf install -y bpftrace bcc-tools libbpf-devel kernel-devel\n\n# Verify bpftrace works\nsudo bpftrace -e 'BEGIN { printf(\"eBPF is working\\n\"); exit(); }'\n```\n\n---\n\n## 3. Cilium Setup\n\nCilium can optionally replace kube-proxy when configured for the cluster, providing identity-aware security and deep network observability via Hubble.\n\n### Install Cilium on Kubernetes\n\n```bash\n# Add the Cilium Helm repo\nhelm repo add cilium https:\u002F\u002Fhelm.cilium.io\u002F\nhelm repo update\n\n# Install Cilium with Hubble enabled\nhelm install cilium cilium\u002Fcilium --version 1.16.4 \\\n  --namespace kube-system \\\n  --set kubeProxyReplacement=true \\\n  --set k8sServiceHost=\"${API_SERVER_IP}\" \\\n  --set k8sServicePort=\"${API_SERVER_PORT}\" \\\n  --set hubble.enabled=true \\\n  --set hubble.relay.enabled=true \\\n  --set hubble.ui.enabled=true \\\n  --set hubble.metrics.enableOpenMetrics=true \\\n  --set hubble.metrics.enabled=\"{dns,drop,tcp,flow,port-distribution,icmp,httpV2:exemplars=true;labelsContext=source_ip\\,source_namespace\\,source_workload\\,destination_ip\\,destination_namespace\\,destination_workload}\"\n\n# Wait for Cilium to be ready\ncilium status --wait\n```\n\n### Install the Cilium CLI and Hubble CLI\n\n```bash\n# Install reviewed platform-specific Cilium\u002FHubble CLI releases through the current official process.\n# Verify checksums\u002Fsignatures and archive members before extraction into a private staging directory.\n# Do not extract unverified latest archives directly into \u002Fusr\u002Flocal\u002Fbin.\n```\n\n### Hubble Network Observability\n\n```bash\n# Port-forward the Hubble Relay\ncilium hubble port-forward &\n\n# Observe all flows in real time\nhubble observe --follow\n\n# Filter flows by namespace\nhubble observe --namespace production --follow\n\n# Filter by verdict (dropped traffic)\nhubble observe --verdict DROPPED --follow\n\n# Filter by DNS queries\nhubble observe --protocol DNS --follow\n\n# Filter HTTP traffic to a specific service\nhubble observe --to-label \"app=api-server\" --protocol HTTP --follow\n\n# Export flows as JSON for ingestion into SIEM\nhubble observe --output json --last 1000 > flows.json\n```\n\n### Hubble UI Access\n\n```bash\n# Port-forward the Hubble UI\nkubectl port-forward -n kube-system svc\u002Fhubble-ui 12000:80\n\n# Access at http:\u002F\u002Flocalhost:12000 -- provides a real-time service dependency map\n```\n\n---\n\n## 4. Tetragon for Security\n\nTetragon is Cilium's runtime security enforcement engine. It uses eBPF to observe and enforce security policies at the kernel level with zero application changes.\n\n### Install Tetragon\n\n```bash\nhelm repo add cilium https:\u002F\u002Fhelm.cilium.io\u002F\nhelm repo update\n\nhelm install tetragon cilium\u002Ftetragon \\\n  --namespace kube-system \\\n  --set tetragon.grpc.enabled=true \\\n  --set tetragon.exportFilename=\u002Fvar\u002Frun\u002Fcilium\u002Ftetragon\u002Ftetragon.log\n\n# Install a pinned reviewed tetra CLI using verified release artifacts and a private staging directory.\n```\n\n### Process Execution Monitoring\n\n```yaml\n# process-monitor.yaml -- TracingPolicy to monitor all process executions\napiVersion: cilium.io\u002Fv1alpha1\nkind: TracingPolicy\nmetadata:\n  name: process-execution-monitor\nspec:\n  kprobes: []\n  tracepoints: []\n  uprobes: []\n  enforcers: []\n  # process_exec and process_exit events are always emitted by default\n  # Use tetra CLI to observe them:\n```\n\n```bash\n# Watch all process executions cluster-wide\nkubectl exec -n kube-system ds\u002Ftetragon -c tetragon -- tetra getevents -o compact --process-exec\n\n# Filter to a specific namespace\nkubectl exec -n kube-system ds\u002Ftetragon -c tetragon -- tetra getevents -o compact \\\n  --namespace production\n```\n\n### File Access Tracking\n\n```yaml\n# file-access-policy.yaml -- detect reads\u002Fwrites to sensitive files\napiVersion: cilium.io\u002Fv1alpha1\nkind: TracingPolicy\nmetadata:\n  name: sensitive-file-access\nspec:\n  kprobes:\n    - call: \"security_file_open\"\n      syscall: false\n      args:\n        - index: 0\n          type: \"file\"\n      selectors:\n        - matchArgs:\n            - index: 0\n              operator: \"Prefix\"\n              values:\n                - \"\u002Fetc\u002Fshadow\"\n                - \"\u002Fetc\u002Fpasswd\"\n                - \"\u002Fetc\u002Fkubernetes\u002Fpki\"\n                - \"\u002Fvar\u002Frun\u002Fsecrets\u002Fkubernetes.io\"\n                - \"\u002Froot\u002F.ssh\"\n```\n\n```bash\nkubectl apply -f file-access-policy.yaml\n\n# Observe file access events\nkubectl exec -n kube-system ds\u002Ftetragon -c tetragon -- tetra getevents -o compact \\\n  | grep \"sensitive-file-access\"\n```\n\n### Network Connection Enforcement\n\n```yaml\n# restrict-egress.yaml -- block unexpected outbound connections\napiVersion: cilium.io\u002Fv1alpha1\nkind: TracingPolicy\nmetadata:\n  name: restrict-egress-connections\nspec:\n  kprobes:\n    - call: \"tcp_connect\"\n      syscall: false\n      args:\n        - index: 0\n          type: \"sock\"\n      selectors:\n        - matchArgs:\n            - index: 0\n              operator: \"DAddr\"\n              values:\n                - \"169.254.169.254\"  # Block IMDS access\n          matchActions:\n            - action: Post  # observe only; enforcement requires separate reviewed scope\n        - matchNamespaces:\n            - namespace: Mnt\n              operator: NotIn\n              values:\n                - \"host_mnt\"\n```\n\n```bash\nkubectl apply -f restrict-egress.yaml\n```\n\n### Privileged Escalation Detection\n\n```yaml\n# detect-privilege-escalation.yaml\napiVersion: cilium.io\u002Fv1alpha1\nkind: TracingPolicy\nmetadata:\n  name: detect-privilege-escalation\nspec:\n  kprobes:\n    - call: \"__x64_sys_setuid\"\n      syscall: true\n      args:\n        - index: 0\n          type: \"int\"\n      selectors:\n        - matchArgs:\n            - index: 0\n              operator: \"Equal\"\n              values:\n                - \"0\"\n          matchActions:\n            - action: Post\n              rateLimit: \"1m\"\n    - call: \"__x64_sys_setns\"\n      syscall: true\n      args:\n        - index: 1\n          type: \"int\"\n      selectors:\n        - matchActions:\n            - action: Post\n```\n\n```bash\nkubectl apply -f detect-privilege-escalation.yaml\n```\n\n---\n\n## 5. bpftrace One-Liners\n\nThese are version-specific tracing sketches: validate in a test host and obtain production scope, duration, data and overhead limits before attachment.\n\n### Syscall Latency\n\n```bash\n# Trace read() syscall latency distribution (microseconds)\nsudo bpftrace -e 'tracepoint:syscalls:sys_enter_read { @start[tid] = nsecs; }\n  tracepoint:syscalls:sys_exit_read \u002F@start[tid]\u002F {\n    @usecs = hist((nsecs - @start[tid]) \u002F 1000);\n    delete(@start[tid]);\n  }'\n\n# Top 10 slowest syscalls by total time\nsudo bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @start[tid] = nsecs; }\n  tracepoint:raw_syscalls:sys_exit \u002F@start[tid]\u002F {\n    @ns[args->id] = sum(nsecs - @start[tid]);\n    delete(@start[tid]);\n  } END { print(@ns, 10); }'\n```\n\n### DNS Tracing\n\n```bash\n# Trace DNS queries via UDP port 53 sends\nsudo bpftrace -e 'kprobe:udp_sendmsg {\n    $sk = (struct sock *)arg0;\n    $dport = ($sk->__sk_common.skc_dport >> 8) | (($sk->__sk_common.skc_dport & 0xff) \u003C\u003C 8);\n    if ($dport == 53) {\n      printf(\"%-8d %-16s DNS query to %s\\n\", pid, comm,\n        ntop($sk->__sk_common.skc_daddr));\n    }\n  }'\n\n# Count DNS queries by source process\nsudo bpftrace -e 'kprobe:udp_sendmsg {\n    $sk = (struct sock *)arg0;\n    $dport = ($sk->__sk_common.skc_dport >> 8) | (($sk->__sk_common.skc_dport & 0xff) \u003C\u003C 8);\n    if ($dport == 53) { @dns[comm] = count(); }\n  }'\n```\n\n### TCP Retransmits\n\n```bash\n# Trace TCP retransmits with source\u002Fdestination\nsudo bpftrace -e 'kprobe:tcp_retransmit_skb {\n    $sk = (struct sock *)arg0;\n    $daddr = ntop($sk->__sk_common.skc_daddr);\n    $saddr = ntop($sk->__sk_common.skc_rcv_saddr);\n    $dport = ($sk->__sk_common.skc_dport >> 8) | (($sk->__sk_common.skc_dport & 0xff) \u003C\u003C 8);\n    $sport = $sk->__sk_common.skc_num;\n    printf(\"%-20s %-6d -> %-20s %-6d (%s)\\n\", $saddr, $sport, $daddr, $dport, comm);\n  }'\n```\n\n### Disk I\u002FO Latency\n\n```bash\n# Block I\u002FO latency histogram by device\nsudo bpftrace -e 'tracepoint:block:block_rq_issue { @start[args->dev, args->sector] = nsecs; }\n  tracepoint:block:block_rq_complete \u002F@start[args->dev, args->sector]\u002F {\n    @usecs[args->dev] = hist((nsecs - @start[args->dev, args->sector]) \u002F 1000);\n    delete(@start[args->dev, args->sector]);\n  }'\n\n# Top processes by disk I\u002FO bytes\nsudo bpftrace -e 'tracepoint:block:block_rq_issue {\n    @bytes[comm] = sum(args->bytes);\n  } interval:s:5 { print(@bytes, 10); clear(@bytes); }'\n```\n\n### Container-Aware Tracing\n\n```bash\n# Trace process exec with cgroup IDs; this example has no container-only filter\nsudo bpftrace -e 'tracepoint:syscalls:sys_enter_execve {\n    printf(\"%-8d %-8d %-16s %s\\n\", pid, cgroup, comm, str(args->filename));\n  }'\n\n# Memory allocation hotspots per container\nsudo bpftrace -e 'kprobe:__alloc_pages { @pages[cgroup] = count(); }\n  interval:s:10 { print(@pages, 10); clear(@pages); }'\n```\n\n---\n\n\n## Contents\n\n- [6. Prometheus Integration](references\u002Fdetails.md)\n- [7. Network Observability](references\u002Fdetails.md)\n- [8. Security Monitoring](references\u002Fdetails.md)\n- [9. Performance Profiling](references\u002Fdetails.md)\n- [10. Troubleshooting](references\u002Fdetails.md)\n\n## When to Use\n\nUse eBPF-based observability when you need:\n\n- **Deep performance debugging** -- trace kernel-level latency, syscall overhead, and scheduling delays that application-level metrics cannot reveal.\n- **Network observability without sidecars** -- capture L3\u002FL4\u002FL7 flows, DNS queries, and TCP state transitions directly from the kernel, eliminating the CPU and memory overhead of sidecar proxies.\n- **Security monitoring at the kernel boundary** -- detect container escapes, unexpected process execution, sensitive file access, and anomalous syscall patterns in real time.\n- **Continuous profiling** -- measure host-specific CPU\u002Fmemory\u002Fevent overhead; no under1% guarantee is provided.\n- **Service mesh replacement or augmentation** -- Cilium can replace kube-proxy and provide identity-aware network policies enforced at the kernel level.\n\nAvoid eBPF when your kernel version is below 4.19, when you are running on managed platforms that restrict BPF capabilities, or when your debugging needs are fully met by application-level tracing.\n\n---\n\n## Limitations\n\n- Guidance executes against real environments: confirm target, blast radius, and rollback plan before applying anything.\n- Never deploy to production without explicit approval. Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\ngit status && git diff --stat\nkubectl diff -f manifest.yaml\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n\n### Tracing and deployment limits\n\nKernel\u002Fversion tables and Helm values are snapshots; support also depends on BTF, config, architecture, LSM and capabilities. The verifier is not a blanket safety guarantee: tracing can expose secrets and exhaust resources. CNI\u002Fkube-proxy replacement can disrupt the whole cluster; inventory current topology\u002Fversions, confirm management access and rollback, stage a reviewed chart release and measure connectivity. Observe-only Post policies are not network blocking; do not describe Sigkill as a safe packet deny.\n\nSyscall kprobe naming and argument decoding vary by Tetragon\u002Fversion\u002Farchitecture; verify syscall:true expectations and current CRDs before loading. A daemonset kubectl exec\u002Flogs target generally selects one pod, not all cluster nodes. Empty TracingPolicy objects do not enable missing event telemetry. File-open events are not proof of file modification; rate limiting can suppress evidence.\n\nBound every follow\u002Fprobe by duration\u002FPID\u002Fcgroup and secure output permissions\u002Fretention. bpftrace examples need actual available fields\u002Ftypes: UDP connected-socket assumptions can miss sendto destinations, dev+sector is not a unique block-request identity, and kernel stack\u002Fprobe labels do not prove user-level causality. No kernel program, package, cluster policy or live trace was executed.\n","# eBPF Observability\n\neBPF (extended Berkeley Packet Filter) allows you to run sandboxed programs in the Linux kernel without modifying kernel source code or loading kernel modules. This skill covers using eBPF for deep observability, network monitoring, and security enforcement across cloud-native infrastructure.\n\n---\n\n## 2. Prerequisites\n\n### Kernel Version Requirements\n\n| Feature                  | Minimum Kernel | Recommended Kernel |\n|--------------------------|----------------|--------------------|\n| Basic BPF maps & probes  | 4.9            | 5.10+              |\n| BPF CO-RE (BTF support)  | 5.2            | 5.10+              |\n| BPF ring buffer          | 5.8            | 5.10+              |\n| BPF LSM hooks            | 5.7            | 5.15+              |\n| Cilium full features     | 4.19           | 5.10+              |\n| Tetragon                 | 4.19           | 5.13+              |\n\n### Verify Kernel Support\n\n```bash\n# Check kernel version\nuname -r\n\n# Verify BTF (BPF Type Format) is enabled -- required for CO-RE\nls \u002Fsys\u002Fkernel\u002Fbtf\u002Fvmlinux\n\n# Check BPF filesystem is mounted\nmount | grep bpf\n\n# If not mounted, mount it\nsudo mount -t bpf bpf \u002Fsys\u002Ffs\u002Fbpf\n\n# Verify BPF JIT is enabled\ncat \u002Fproc\u002Fsys\u002Fnet\u002Fcore\u002Fbpf_jit_enable\n# Should return 1; if not:\nsudo sysctl net.core.bpf_jit_enable=1\n```\n\n### Install Toolchain\n\n```bash\n# Ubuntu\u002FDebian -- install bpftrace, bcc tools, and libbpf\nsudo apt-get update\nsudo apt-get install -y bpftrace bpfcc-tools libbpf-dev linux-headers-$(uname -r)\n\n# Fedora\u002FRHEL\nsudo dnf install -y bpftrace bcc-tools libbpf-devel kernel-devel\n\n# Verify bpftrace works\nsudo bpftrace -e 'BEGIN { printf(\"eBPF is working\\n\"); exit(); }'\n```\n\n---\n\n## 3. Cilium Setup\n\nCilium can optionally replace kube-proxy when configured for the cluster, providing identity-aware security and deep network observability via Hubble.\n\n### Install Cilium on Kubernetes\n\n```bash\n# Add the Cilium Helm repo\nhelm repo add cilium https:\u002F\u002Fhelm.cilium.io\u002F\nhelm repo update\n\n# Install Cilium with Hubble enabled\nhelm install cilium cilium\u002Fcilium --version 1.16.4 \\\n  --namespace kube-system \\\n  --set kubeProxyReplacement=true \\\n  --set k8sServiceHost=\"${API_SERVER_IP}\" \\\n  --set k8sServicePort=\"${API_SERVER_PORT}\" \\\n  --set hubble.enabled=true \\\n  --set hubble.relay.enabled=true \\\n  --set hubble.ui.enabled=true \\\n  --set hubble.metrics.enableOpenMetrics=true \\\n  --set hubble.metrics.enabled=\"{dns,drop,tcp,flow,port-distribution,icmp,httpV2:exemplars=true;labelsContext=source_ip\\,source_namespace\\,source_workload\\,destination_ip\\,destination_namespace\\,destination_workload}\"\n\n# Wait for Cilium to be ready\ncilium status --wait\n```\n\n### Install the Cilium CLI and Hubble CLI\n\n```bash\n# Install reviewed platform-specific Cilium\u002FHubble CLI releases through the current official process.\n# Verify checksums\u002Fsignatures and archive members before extraction into a private staging directory.\n# Do not extract unverified latest archives directly into \u002Fusr\u002Flocal\u002Fbin.\n```\n\n### Hubble Network Observability\n\n```bash\n# Port-forward the Hubble Relay\ncilium hubble port-forward &\n\n# Observe all flows in real time\nhubble observe --follow\n\n# Filter flows by namespace\nhubble observe --namespace production --follow\n\n# Filter by verdict (dropped traffic)\nhubble observe --verdict DROPPED --follow\n\n# Filter by DNS queries\nhubble observe --protocol DNS --follow\n\n# Filter HTTP traffic to a specific service\nhubble observe --to-label \"app=api-server\" --protocol HTTP --follow\n\n# Export flows as JSON for ingestion into SIEM\nhubble observe --output json --last 1000 > flows.json\n```\n\n### Hubble UI Access\n\n```bash\n# Port-forward the Hubble UI\nkubectl port-forward -n kube-system svc\u002Fhubble-ui 12000:80\n\n# Access at http:\u002F\u002Flocalhost:12000 -- provides a real-time service dependency map\n```\n\n---\n\n## 4. Tetragon for Security\n\nTetragon is Cilium's runtime security enforcement engine. It uses eBPF to observe and enforce security policies at the kernel level with zero application changes.\n\n### Install Tetragon\n\n```bash\nhelm repo add cilium https:\u002F\u002Fhelm.cilium.io\u002F\nhelm repo update\n\nhelm install tetragon cilium\u002Ftetragon \\\n  --namespace kube-system \\\n  --set tetragon.grpc.enabled=true \\\n  --set tetragon.exportFilename=\u002Fvar\u002Frun\u002Fcilium\u002Ftetragon\u002Ftetragon.log\n\n# Install a pinned reviewed tetra CLI using verified release artifacts and a private staging directory.\n```\n\n### Process Execution Monitoring\n\n```yaml\n# process-monitor.yaml -- TracingPolicy to monitor all process executions\napiVersion: cilium.io\u002Fv1alpha1\nkind: TracingPolicy\nmetadata:\n  name: process-execution-monitor\nspec:\n  kprobes: []\n  tracepoints: []\n  uprobes: []\n  enforcers: []\n  # process_exec and process_exit events are always emitted by default\n  # Use tetra CLI to observe them:\n```\n\n```bash\n# Watch all process executions cluster-wide\nkubectl exec -n kube-system ds\u002Ftetragon -c tetragon -- tetra getevents -o compact --process-exec\n\n# Filter to a specific namespace\nkubectl exec -n kube-system ds\u002Ftetragon -c tetragon -- tetra getevents -o compact \\\n  --namespace production\n```\n\n### File Access Tracking\n\n```yaml\n# file-access-policy.yaml -- detect reads\u002Fwrites to sensitive files\napiVersion: cilium.io\u002Fv1alpha1\nkind: TracingPolicy\nmetadata:\n  name: sensitive-file-access\nspec:\n  kprobes:\n    - call: \"security_file_open\"\n      syscall: false\n      args:\n        - index: 0\n          type: \"file\"\n      selectors:\n        - matchArgs:\n            - index: 0\n              operator: \"Prefix\"\n              values:\n                - \"\u002Fetc\u002Fshadow\"\n                - \"\u002Fetc\u002Fpasswd\"\n                - \"\u002Fetc\u002Fkubernetes\u002Fpki\"\n                - \"\u002Fvar\u002Frun\u002Fsecrets\u002Fkubernetes.io\"\n                - \"\u002Froot\u002F.ssh\"\n```\n\n```bash\nkubectl apply -f file-access-policy.yaml\n\n# Observe file access events\nkubectl exec -n kube-system ds\u002Ftetragon -c tetragon -- tetra getevents -o compact \\\n  | grep \"sensitive-file-access\"\n```\n\n### Network Connection Enforcement\n\n```yaml\n# restrict-egress.yaml -- block unexpected outbound connections\napiVersion: cilium.io\u002Fv1alpha1\nkind: TracingPolicy\nmetadata:\n  name: restrict-egress-connections\nspec:\n  kprobes:\n    - call: \"tcp_connect\"\n      syscall: false\n      args:\n        - index: 0\n          type: \"sock\"\n      selectors:\n        - matchArgs:\n            - index: 0\n              operator: \"DAddr\"\n              values:\n                - \"169.254.169.254\"  # Block IMDS access\n          matchActions:\n            - action: Post  # observe only; enforcement requires separate reviewed scope\n        - matchNamespaces:\n            - namespace: Mnt\n              operator: NotIn\n              values:\n                - \"host_mnt\"\n```\n\n```bash\nkubectl apply -f restrict-egress.yaml\n```\n\n### Privileged Escalation Detection\n\n```yaml\n# detect-privilege-escalation.yaml\napiVersion: cilium.io\u002Fv1alpha1\nkind: TracingPolicy\nmetadata:\n  name: detect-privilege-escalation\nspec:\n  kprobes:\n    - call: \"__x64_sys_setuid\"\n      syscall: true\n      args:\n        - index: 0\n          type: \"int\"\n      selectors:\n        - matchArgs:\n            - index: 0\n              operator: \"Equal\"\n              values:\n                - \"0\"\n          matchActions:\n            - action: Post\n              rateLimit: \"1m\"\n    - call: \"__x64_sys_setns\"\n      syscall: true\n      args:\n        - index: 1\n          type: \"int\"\n      selectors:\n        - matchActions:\n            - action: Post\n```\n\n```bash\nkubectl apply -f detect-privilege-escalation.yaml\n```\n\n---\n\n## 5. bpftrace One-Liners\n\nThese are version-specific tracing sketches: validate in a test host and obtain production scope, duration, data and overhead limits before attachment.\n\n### Syscall Latency\n\n```bash\n# Trace read() syscall latency distribution (microseconds)\nsudo bpftrace -e 'tracepoint:syscalls:sys_enter_read { @start[tid] = nsecs; }\n  tracepoint:syscalls:sys_exit_read \u002F@start[tid]\u002F {\n    @usecs = hist((nsecs - @start[tid]) \u002F 1000);\n    delete(@start[tid]);\n  }'\n\n# Top 10 slowest syscalls by total time\nsudo bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @start[tid] = nsecs; }\n  tracepoint:raw_syscalls:sys_exit \u002F@start[tid]\u002F {\n    @ns[args->id] = sum(nsecs - @start[tid]);\n    delete(@start[tid]);\n  } END { print(@ns, 10); }'\n```\n\n### DNS Tracing\n\n```bash\n# Trace DNS queries via UDP port 53 sends\nsudo bpftrace -e 'kprobe:udp_sendmsg {\n    $sk = (struct sock *)arg0;\n    $dport = ($sk->__sk_common.skc_dport >> 8) | (($sk->__sk_common.skc_dport & 0xff) \u003C\u003C 8);\n    if ($dport == 53) {\n      printf(\"%-8d %-16s DNS query to %s\\n\", pid, comm,\n        ntop($sk->__sk_common.skc_daddr));\n    }\n  }'\n\n# Count DNS queries by source process\nsudo bpftrace -e 'kprobe:udp_sendmsg {\n    $sk = (struct sock *)arg0;\n    $dport = ($sk->__sk_common.skc_dport >> 8) | (($sk->__sk_common.skc_dport & 0xff) \u003C\u003C 8);\n    if ($dport == 53) { @dns[comm] = count(); }\n  }'\n```\n\n### TCP Retransmits\n\n```bash\n# Trace TCP retransmits with source\u002Fdestination\nsudo bpftrace -e 'kprobe:tcp_retransmit_skb {\n    $sk = (struct sock *)arg0;\n    $daddr = ntop($sk->__sk_common.skc_daddr);\n    $saddr = ntop($sk->__sk_common.skc_rcv_saddr);\n    $dport = ($sk->__sk_common.skc_dport >> 8) | (($sk->__sk_common.skc_dport & 0xff) \u003C\u003C 8);\n    $sport = $sk->__sk_common.skc_num;\n    printf(\"%-20s %-6d -> %-20s %-6d (%s)\\n\", $saddr, $sport, $daddr, $dport, comm);\n  }'\n```\n\n### Disk I\u002FO Latency\n\n```bash\n# Block I\u002FO latency histogram by device\nsudo bpftrace -e 'tracepoint:block:block_rq_issue { @start[args->dev, args->sector] = nsecs; }\n  tracepoint:block:block_rq_complete \u002F@start[args->dev, args->sector]\u002F {\n    @usecs[args->dev] = hist((nsecs - @start[args->dev, args->sector]) \u002F 1000);\n    delete(@start[args->dev, args->sector]);\n  }'\n\n# Top processes by disk I\u002FO bytes\nsudo bpftrace -e 'tracepoint:block:block_rq_issue {\n    @bytes[comm] = sum(args->bytes);\n  } interval:s:5 { print(@bytes, 10); clear(@bytes); }'\n```\n\n### Container-Aware Tracing\n\n```bash\n# Trace process exec with cgroup IDs; this example has no container-only filter\nsudo bpftrace -e 'tracepoint:syscalls:sys_enter_execve {\n    printf(\"%-8d %-8d %-16s %s\\n\", pid, cgroup, comm, str(args->filename));\n  }'\n\n# Memory allocation hotspots per container\nsudo bpftrace -e 'kprobe:__alloc_pages { @pages[cgroup] = count(); }\n  interval:s:10 { print(@pages, 10); clear(@pages); }'\n```\n\n---\n\n\n## Contents\n\n- [6. Prometheus Integration](references\u002Fdetails.md)\n- [7. Network Observability](references\u002Fdetails.md)\n- [8. Security Monitoring](references\u002Fdetails.md)\n- [9. Performance Profiling](references\u002Fdetails.md)\n- [10. Troubleshooting](references\u002Fdetails.md)\n\n## When to Use\n\nUse eBPF-based observability when you need:\n\n- **Deep performance debugging** -- trace kernel-level latency, syscall overhead, and scheduling delays that application-level metrics cannot reveal.\n- **Network observability without sidecars** -- capture L3\u002FL4\u002FL7 flows, DNS queries, and TCP state transitions directly from the kernel, eliminating the CPU and memory overhead of sidecar proxies.\n- **Security monitoring at the kernel boundary** -- detect container escapes, unexpected process execution, sensitive file access, and anomalous syscall patterns in real time.\n- **Continuous profiling** -- measure host-specific CPU\u002Fmemory\u002Fevent overhead; no under1% guarantee is provided.\n- **Service mesh replacement or augmentation** -- Cilium can replace kube-proxy and provide identity-aware network policies enforced at the kernel level.\n\nAvoid eBPF when your kernel version is below 4.19, when you are running on managed platforms that restrict BPF capabilities, or when your debugging needs are fully met by application-level tracing.\n\n---\n\n## Limitations\n\n- Guidance executes against real environments: confirm target, blast radius, and rollback plan before applying anything.\n- Never deploy to production without explicit approval. Docs-only import: upstream scripts and templates not bundled.\n\n### Example\n\n```bash\ngit status && git diff --stat\nkubectl diff -f manifest.yaml\n```\n\n> Adapted from [BagelHole\u002FDevOps-Security-Agent-Skills](https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.\n\n### Tracing and deployment limits\n\nKernel\u002Fversion tables and Helm values are snapshots; support also depends on BTF, config, architecture, LSM and capabilities. The verifier is not a blanket safety guarantee: tracing can expose secrets and exhaust resources. CNI\u002Fkube-proxy replacement can disrupt the whole cluster; inventory current topology\u002Fversions, confirm management access and rollback, stage a reviewed chart release and measure connectivity. Observe-only Post policies are not network blocking; do not describe Sigkill as a safe packet deny.\n\nSyscall kprobe naming and argument decoding vary by Tetragon\u002Fversion\u002Farchitecture; verify syscall:true expectations and current CRDs before loading. A daemonset kubectl exec\u002Flogs target generally selects one pod, not all cluster nodes. Empty TracingPolicy objects do not enable missing event telemetry. File-open events are not proof of file modification; rate limiting can suppress evidence.\n\nBound every follow\u002Fprobe by duration\u002FPID\u002Fcgroup and secure output permissions\u002Fretention. bpftrace examples need actual available fields\u002Ftypes: UDP connected-socket assumptions can miss sendto destinations, dev+sector is not a unique block-request identity, and kernel stack\u002Fprobe labels do not prove user-level causality. No kernel program, package, cluster policy or live trace was executed.\n",{"name":5,"risk":26,"source":44,"license":14,"category":45,"metadata":46,"date_added":49,"description":7,"source_repo":50,"source_type":30,"compatibility":51,"license_source":52},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":47,"version":48},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant platform CLIs (kubectl, helm, terraform, git, CI runners) and authorized access to the target environment. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-ebpf-observability",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add boisenoise\u002Fskills-collections --skill ebpf-observability",{"tool":65,"command":66},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill ebpf-observability",{"tool":68,"command":69},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill ebpf-observability","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-ebpf-observability\u002FSKILL.md",true,[73],{"path":74,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fdetails.md","REFERENCE","参考文档",15143,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-ebpf-observability\u002Freferences\u002Fdetails.md",[80,89,97,106,114,122],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":84,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":88},"01M7B6HREHB53EHGGVZND7DDXN","scrapely-scrape","Collect web data with ready-made Scrape.ly scrapers: Google Maps places, Amazon products, LinkedIn jobs, reviews, social posts. Use when the user wants structured data from a site.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":93,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":88},"01M7B6GDNNN4HE662KA6KPF7GW","lumify-odds","Lumify's hosted sports MCP\u002FREST API for sportsbook odds, line-movement history, public betting splits, and player props across MLB, NFL, NBA, NHL, soccer, tennis, NCAAF, NCAAB. Read-only market data.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":101,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":105},"01M743PZMJW2GEKG5J199GPSK7","sync-lipsync","Lip-sync an existing video of a real person to new audio or a typed script with sync. labs through its hosted MCP server, quoting the cost and waiting for approval first.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":110,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":105},"01M743MMN3CKTJVNRSZMB684E5","music-for-robots","Optional music-inspired creative exercise for multimodal agents. Ingests an unquantized acoustic MP3 composition by Michael Luchtan (Music For Robots) into a private temporary directory, analyzing microtiming and texture to inspire creative writing, brainstorming, or technical tasks.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":118,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":105},"01M743KC2GN5WE11BSTWSSWD8B","imagera-media","Generate or edit images, video clips, voiceovers and music through the hosted Imagera MCP server, quoting the credit cost and getting approval before each paid call.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":126,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":105},"01M743HDJNZQA8A4VT68NWGWQJ","deja-history","Search this machine's past AI coding sessions across Claude Code, Codex, Cursor, Gemini CLI and thirty-nine other agents before editing, debugging, or denying something exists.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FSKILL.md",[],[]]