Local
The qtap-config.yaml
file is used to configure Qtap, an eBPF probe that captures application traffic before encryption without requiring certificate management. This file defines global settings and specific endpoint capture rules.
Configuration File Structure
The qtap-config.yaml
file consists of four main sections:
Global Qtap Settings
Protocol Specific Settings
Endpoint-specific Capture Rules
Stacks
Here's an example of the basic structure:
Global Settings
These settings apply across the entire Qtap configuration.
direction
: Determines which traffic direction to capture. Options are:all
: Capture all trafficingress
: Capture only incoming trafficegress
: Capture only outgoing trafficegress-external
: Capture only outgoing traffic to external networksegress-internal
: Capture only outgoing traffic within internal networks
audit_logs
: Specifies where to publish audit logs. Options are:stdout
: Print to standard outputpulse
: Send to a pulse service (if configured)none
: Disable audit logging
audit_include_dns
: When set totrue
, includes DNS information in audit logs. Whenfalse
, DNS information is excluded.ignore_loopback
: When set totrue
, ignores traffic on the loopback interface. Whenfalse
, captures loopback traffic.
HTTP Data Stream Settings
These settings control how HTTP data streams are handled globally.
stack
: Specifies the default middleware stack to use for HTTP traffic. Usenone
for no middleware.
Endpoint-specific Capture Rules
Controls specific settings for individual domains, overriding the global and protocol settings.
domain
: The specific domain to which the rule applieshttp
: HTTP-specific settings for this domainstack
: Overrides the globalstack
setting for this domain
Stacks
Qtap supports the concept of "stacks," which are collections of middleware modules that can be applied to the captured traffic. Stacks allow you to customize the processing and analysis of the traffic data.
To define a stack, add a stacks
section to your qtap-config.yaml
file:
In this example, we define a stack named stdout
that includes the built-in access_logs
middleware with the full
mode configuration. This middleware will log all HTTP traffic to stdout.
You can define multiple stacks and selectively apply them to different protocols or endpoints by using the endpoints
section of the configuration file.
Applying Stacks
Once you have defined a stack, you can apply it to the captured traffic by specifying it in the tap
section of your qtap-config.yaml
file:
In this example, we set the http.stack
option to stdout
, which tells Qtap to apply the stdout
stack to all HTTP traffic.
You can define multiple stacks and selectively apply them to different protocols or endpoints by using the endpoints
section of the configuration file.
Last updated