Stdout Exporter
The stdout exporter outputs flow records directly to the console (standard output), making it ideal for development, debugging, and initial testing of Mermin.
Overview
While OTLP export is used for production observability, the stdout exporter provides immediate, human-readable visibility into captured flows without requiring an external collector.
Configuration
export "traces" {
stdout = "text_indent"
}Configuration Option
stdout
stdoutType: String (enum) or null Default: null (disabled)
Output format for stdout exporter.
Valid Values:
"text_indent": Human-readable, indented text format (recommended)null: Disable stdout export
Examples:
Enable stdout exporter:
Disable stdout exporter:
Output Format
Text Indent Format
The text_indent format provides structured, readable output:
Use Cases
Development and Testing
Use stdout during initial development:
Benefits:
No external dependencies
Immediate feedback
Easy debugging
Simple setup
Debugging Flow Issues
Enable stdout temporarily to debug flow capture:
Workflow:
Enable stdout exporter
Deploy or reload configuration
View logs:
kubectl logs -f <pod-name>Inspect flow records
Disable stdout when done
Quick Start and Demos
Use stdout for quick demonstrations:
Pipeline Validation
Verify flow generation before setting up full OTLP pipeline:
Combined with OTLP
You can enable both stdout and OTLP exporters simultaneously:
When to use both:
Debugging export issues
Comparing local vs. exported data
Validating flow enrichment
Troubleshooting transformations
Viewing Stdout Output
Kubernetes
View logs from Mermin pods:
Docker (Bare Metal)
View logs from Docker container:
Systemd
View logs from systemd service:
Filtering Stdout Output
Using grep
Filter flows by criteria:
Using jq (if JSON format available)
While Mermin currently supports text_indent format, future JSON support would enable:
Performance Considerations
Log Volume
Stdout output can generate significant log volume:
Typical flow rate: 1,000 flows/second Text indent size: ~500 bytes per flow Log rate: ~500 KB/second = ~1.8 GB/hour
Recommendations:
Use stdout only for development/debugging
Disable for production environments
Configure log rotation if enabled long-term
CPU Impact
Formatting flow records for stdout has minimal CPU overhead:
Text formatting: < 1% CPU
Logging I/O: < 2% CPU
Enable stdout without significant performance impact for debugging.
Log Rotation
Configure log rotation to prevent disk filling:
Docker:
Kubernetes:
Troubleshooting
No Output Visible
Symptoms: Stdout exporter enabled but no flow records in logs
Solutions:
Verify
stdout = "text_indent"is setCheck log level includes info:
log_level = "info"Verify flows are being captured: check metrics
Confirm log output destination
Too Much Output
Symptoms: Logs filling up quickly, hard to read
Solutions:
Add flow filters (see Filtering)
Reduce monitored interfaces
Use grep to filter relevant flows
Disable stdout after debugging
Output Format Issues
Symptoms: Truncated or malformed output
Solutions:
Check log collection limits
Verify container logs aren't being truncated
Increase log line length limits if needed
Best Practices
Disable in production: Use OTLP for production environments
Enable temporarily: Turn on only when needed for debugging
Use with filters: Combine with flow filters to reduce volume
Monitor disk space: Ensure adequate disk for logs
Automate cleanup: Configure log rotation
Document usage: Note when/why stdout is enabled
Configuration Examples
Development Only
Debugging with OTLP
Production (Stdout Disabled)
Comparison with OTLP
Setup Complexity
None
Requires collector
Storage
Logs/ephemeral
Persistent backend
Query Capability
grep only
Full query language
Production Ready
No
Yes
Resource Usage
Low
Moderate
Scalability
Poor
Excellent
Visualization
None
Dashboards available
Next Steps
OTLP Exporter: Configure production export
Flow Filtering: Reduce log volume
Internal Tracing: Monitor Mermin itself
Integration Guides: Set up observability backends
Last updated