Top Related Projects
Cloud Native Runtime Security
Linux Runtime Security and Forensics using eBPF
BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Inspektor Gadget is a set of tools and framework for data collection and system inspection on Kubernetes clusters and Linux hosts using eBPF
High-level tracing language for Linux
Quick Overview
Tetragon is an eBPF-based security observability and runtime enforcement tool for Kubernetes and Linux. It provides deep visibility into system calls, network activity, and process execution, allowing for real-time monitoring and policy enforcement to enhance security and compliance in cloud-native environments.
Pros
- Offers deep, kernel-level visibility into system activities without modifying applications
- Provides real-time security monitoring and enforcement capabilities
- Integrates well with Kubernetes and cloud-native ecosystems
- Leverages eBPF technology for efficient and low-overhead monitoring
Cons
- Requires kernel version 4.19 or later, which may limit compatibility with older systems
- Has a steeper learning curve due to its advanced features and eBPF technology
- May require additional resources for processing and storing large amounts of telemetry data
- Documentation and community support may be less extensive compared to more established tools
Getting Started
To get started with Tetragon, follow these steps:
- Install Tetragon using Helm:
helm repo add cilium https://helm.cilium.io
helm install tetragon cilium/tetragon -n kube-system
- Apply a simple Tetragon policy:
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: "simple-exec-policy"
spec:
kprobes:
- call: "sys_execve"
syscall: true
args:
- index: 0
type: "string"
selectors:
- matchArgs:
- index: 0
operator: "Equal"
values:
- "/bin/bash"
- Monitor Tetragon events:
kubectl logs -n kube-system -l app.kubernetes.io/name=tetragon -c export-stdout -f | tetra getevents -o compact
This will set up Tetragon in your Kubernetes cluster, apply a simple policy to monitor executions of /bin/bash
, and allow you to view the generated events in real-time.
Competitor Comparisons
Cloud Native Runtime Security
Pros of Falco
- Mature project with extensive community support and integrations
- Broader scope of security events detection beyond just eBPF
- Rich rule language for defining custom security policies
Cons of Falco
- Higher resource consumption compared to Tetragon
- Steeper learning curve for writing complex rules
- Less focus on Kubernetes-specific use cases
Code Comparison
Falco rule example:
- rule: Unauthorized Process
desc: Detect unauthorized process execution
condition: spawned_process and not proc.name in (allowed_processes)
output: "Unauthorized process %proc.name started"
priority: WARNING
Tetragon policy example:
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: "exec-monitor"
spec:
kprobes:
- call: "sys_execve"
syscall: true
args:
- index: 0
type: "string"
Both projects use eBPF for system observability, but Tetragon is more focused on Kubernetes environments and provides a simpler policy definition format. Falco offers a more comprehensive security event detection system with a powerful rule language, while Tetragon emphasizes efficiency and Kubernetes integration. The choice between them depends on specific use cases and environment requirements.
Linux Runtime Security and Forensics using eBPF
Pros of Tracee
- More extensive event tracing capabilities, covering a wider range of system events
- Built-in threat detection rules and customizable security policies
- User-friendly CLI interface for easy interaction and configuration
Cons of Tracee
- Higher resource consumption due to broader event tracing
- Steeper learning curve for advanced features and custom rule creation
- Less focus on network-specific monitoring compared to Tetragon
Code Comparison
Tracee event definition:
type Event struct {
Timestamp time.Time
ProcessName string
Syscall string
Args map[string]interface{}
}
Tetragon event definition:
type Event struct {
Timestamp time.Time
Process *Process
Type EventType
Data interface{}
}
Both projects use similar event structures, but Tetragon's approach is more flexible with a generic Data
field, while Tracee uses a specific Args
map for syscall arguments.
Tracee and Tetragon are both powerful tools for system monitoring and security, with Tracee offering broader event tracing and built-in threat detection, while Tetragon focuses more on network-centric monitoring and integration with Cilium. The choice between them depends on specific use cases and infrastructure requirements.
BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Pros of BCC
- Mature project with extensive documentation and examples
- Supports a wide range of tracing and performance analysis tools
- Flexible and powerful, allowing for custom eBPF programs in Python
Cons of BCC
- Steeper learning curve due to its complexity and breadth
- Requires more manual configuration and setup for specific use cases
- May have higher overhead for some operations compared to Tetragon
Code Comparison
BCC example (Python):
from bcc import BPF
prog = """
int hello(void *ctx) {
bpf_trace_printk("Hello, World!\\n");
return 0;
}
"""
b = BPF(text=prog)
b.attach_kprobe(event="sys_clone", fn_name="hello")
b.trace_print()
Tetragon example (YAML configuration):
spec:
programs:
- name: "hello"
hookName: sys_clone
bpf: |
int hello(void *ctx) {
bpf_printk("Hello, World!\n");
return 0;
}
Both projects leverage eBPF for system observability, but Tetragon focuses on Kubernetes-native security observability, while BCC offers a broader set of tracing and performance analysis tools. Tetragon provides a more streamlined experience for Kubernetes environments, while BCC offers greater flexibility for general-purpose tracing and analysis across various systems.
Inspektor Gadget is a set of tools and framework for data collection and system inspection on Kubernetes clusters and Linux hosts using eBPF
Pros of Inspektor Gadget
- More extensive set of gadgets and tracers for various Kubernetes observability use cases
- Supports multiple eBPF libraries (libbpf and bcc) for broader compatibility
- Offers a user-friendly CLI tool for easier interaction and deployment
Cons of Inspektor Gadget
- May have a steeper learning curve due to its wider range of features
- Potentially higher resource overhead when running multiple gadgets simultaneously
- Less focus on security-specific features compared to Tetragon
Code Comparison
Inspektor Gadget (Go):
func (g *Gadget) Run(ctx context.Context) error {
// Gadget-specific implementation
return g.runGadget(ctx)
}
Tetragon (Go):
func (s *Sensor) Run(ctx context.Context) error {
// Sensor-specific implementation
return s.runSensor(ctx)
}
Both projects use similar patterns for running their respective components (gadgets or sensors), but Inspektor Gadget's implementation is more diverse due to its wider range of gadgets. Tetragon's code is more focused on security-related sensors and events.
High-level tracing language for Linux
Pros of bpftrace
- More flexible and general-purpose, allowing for custom tracing scripts
- Simpler syntax for quick ad-hoc tracing and debugging
- Wider range of supported tracing events and probes
Cons of bpftrace
- Requires more manual effort to set up complex tracing scenarios
- Less integrated with container and Kubernetes environments
- Limited built-in visualization and reporting capabilities
Code Comparison
bpftrace example:
bpftrace -e 'tracepoint:syscalls:sys_enter_open { printf("%s %s\n", comm, str(args->filename)); }'
Tetragon example:
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: "open-files"
spec:
kprobes:
- call: "do_sys_open"
syscall: true
args:
- index: 0
type: "string"
Both examples trace file open operations, but bpftrace uses a one-line command for quick tracing, while Tetragon requires a YAML configuration for more structured and persistent tracing policies.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Ciliumâs new Tetragon component enables powerful real-time, eBPF-based Security Observability and Runtime Enforcement.
Tetragon detects and is able to react to security-significant events, such as
- Process execution events
- System call activity
- I/O activity including network & file access
When used in a Kubernetes environment, Tetragon is Kubernetes-aware - that is, it understands Kubernetes identities such as namespaces, pods and so on - so that security event detection can be configured in relation to individual workloads.
See more about how Tetragon is using eBPF.
Getting started
Refer to the official documentation of Tetragon.
To get started with Tetragon, take a look at the getting started guides to:
Tetragon is able to observe critical hooks in the kernel through its sensors and generates events enriched with Linux and Kubernetes metadata:
- Process lifecycle: generating
process_exec
andprocess_exit
events by default, enabling full process lifecycle observability. Learn more about these events on the process lifecycle use case page. - Generic tracing: generating
process_kprobe
,process_tracepoint
andprocess_uprobe
events for more advanced and custom use cases. Learn more about these events on the TracingPolicy concept page and discover multiple use cases like:
See further resources:
Join the community
Join the Tetragon ð¬ Slack channel and the ð Community Call to chat with developers, maintainers, and other users. This is a good first stop to ask questions and share your experiences.
How to Contribute
For getting started with local development, you can refer to the Contribution Guide. If you plan to submit a PR, please "sign-off" your commits.
Top Related Projects
Cloud Native Runtime Security
Linux Runtime Security and Forensics using eBPF
BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Inspektor Gadget is a set of tools and framework for data collection and system inspection on Kubernetes clusters and Linux hosts using eBPF
High-level tracing language for Linux
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot