schema command outputs the JSON schema definition for Retis event files.
Usage
Overview
This command prints the complete JSON schema that describes the structure of events produced by Retis. The schema can be used for:- Understanding event structure
- Validating event files
- Generating code for parsing events
- Documentation purposes
- IDE autocomplete and validation
Examples
Schema Structure
The schema describes all possible event sections:Event Sections
The schema defines these event sections:Common Section
Kernel Section
Packet Section
SKB Tracking Section
Other Sections
See the full schema output for details on:skb- Socket buffer metadatact- Conntrack informationdev- Network device datanetns- Namespace informationovs- OpenVSwitch eventsnft- Nftables contextskb_drop- Drop reasons
Use Cases
Generate parsing code
Validate event files
IDE integration
Documentation
Schema Format
The output follows JSON Schema Draft 7 specification. Key features:- Type definitions for all fields
- Required vs optional fields
- Nested object structures
- Array types and constraints
- Enumerations for fixed values
Integration Examples
Python with jsonschema
TypeScript type generation
Go struct generation
Schema Versioning
The schema corresponds to the Retis version that generated it. When:- Reading old event files with new Retis versions
- Sharing event files between different Retis versions
- Archiving events for long-term storage
