This guide covers installing the LogFlux Agent, a flexible log collection and forwarding system supporting multiple input sources including CLI, syslog, systemd journal, and container platforms.
LogFlux Agent
The LogFlux Agent is a plugin-based system for comprehensive log collection. It includes a core agent daemon that manages multiple specialized plugins for different log sources, from command-line tools to container platforms and observability protocols.
Quick Install (Recommended)
For Ubuntu/Debian systems:
|
|
For RHEL/CentOS/Rocky/Alma systems:
|
|
Manual APT Repository Setup
If you prefer manual installation on Ubuntu/Debian:
|
|
Other Platforms
The LogFlux Agent supports multiple package repositories:
- RPM Repository:
rpm.logflux.io
(RHEL/CentOS/Rocky/Alma) - Binary Downloads:
download.logflux.io
(all platforms)
Quick Start
After installation, follow these steps to get started:
1. Configure API Key (Required)
Edit the main configuration file:
|
|
Update at minimum:
|
|
2. Start the Main Agent Service
|
|
3. Test the CLI
|
|
4. Enable Core System Plugins
The agent includes essential system log collection plugins:
|
|
These plugins provide comprehensive system log collection:
- Syslog: Collects logs from applications using syslog protocol
- Journald: Integrates with systemd journal for system logs
- File Monitoring: Watches log files for real-time collection
Core Agent Components
The LogFlux Agent includes essential plugins for system log collection:
Core System Plugins
- CLI Plugin (
logflux
) - Command-line tool for manual log submission and testing - Syslog Plugin (
logflux-syslogd
) - Syslog daemon (TCP/UDP port 514) for application logs - Journal Plugin (
logflux-journald
) - systemd journal integration for system logs - Filestream Plugin (
logflux-filestream
) - File monitoring and streaming for log files
These four plugins provide comprehensive coverage for most system logging needs. Additional plugins for container platforms, observability protocols, and cloud providers are available and covered in the integrations section.
Configuration
Basic Configuration
The agent requires minimal configuration. The main configuration file is /etc/logflux-agent/agent.yaml
:
|
|
Advanced Configuration
Create plugin-specific configuration files in /etc/logflux-agent/plugins/
:
|
|
Example plugin configuration:
|
|
Configuration Priority
- Command line flags (override all)
- Configuration file specified with
-config
/etc/logflux-agent/agent.yaml
(main config)/etc/logflux-agent/plugins/<plugin>.yaml
(plugin-specific)- Built-in defaults
CLI Usage Examples
Once configured, you can use the LogFlux CLI in multiple ways:
|
|
Available CLI Options
-config FILE
: Path to configuration file-url URL
: LogFlux server URL-key KEY
: API key for authentication-node ID
: Node identifier-message MSG
: Log message to send-level LEVEL
: Log level (debug, info, warn, error)-prefix PREFIX
: Log prefix-batch
: Enable batch mode (read multiple messages)-interactive
: Interactive mode-health
: Perform health check-version
: Show version information-help
: Show help information-init
: Initialize configuration file-verbose
: Enable verbose output-timestamp TIME
: Custom timestamp (RFC3339 format)-file FILE
: Read log messages from file-tail
: Tail mode - continuously read from stdin-watch FILE
: Watch file for changes and send new lines
Docker Installation
Run the LogFlux Agent using Docker:
|
|
Performance Features
The LogFlux Agent includes several performance optimizations:
- Automatic Batching: All plugins batch messages by default (configurable size and intervals)
- Rate Limiting: Protect against log floods with configurable burst capacity
- Log Filtering: Level-based and regex filtering to reduce network traffic
- Multi-line Handling: Proper stack trace and multi-line event processing
- Field Extraction: Regex-based structured data extraction from log messages
- Log Sampling: Probabilistic sampling with error level preservation
- File Rotation Awareness: Inode-based rotation detection with automatic file discovery
- Connection Pooling: Efficient connection management for high throughput
- Graceful Shutdown: Proper signal handling with queue flushing