When to use Filebeat
Filebeat is ideal for:- Application logs: Custom application log files
- Web server logs: Apache, Nginx, IIS access and error logs
- Container logs: Docker and Kubernetes logs
- Cloud platforms: EC2, Azure VM log files
- Database logs: MySQL, PostgreSQL, MongoDB logs
For Windows Event Logs and Linux syslog, use the UTMStack agent for better integration.
Installation
- Ubuntu/Debian
- RHEL/CentOS
- Docker
Configuration
Basic configuration
Edit/etc/filebeat/filebeat.yml:
filebeat.yml
Multiple log types
Collect different log types with dedicated inputs:filebeat.yml
Docker container logs
Collect logs from Docker containers:filebeat.yml
Kubernetes logs
Deploy Filebeat as DaemonSet to collect Kubernetes logs:filebeat-kubernetes.yml
Multiline log handling
Many applications produce multiline logs (stack traces, JSON). Configure multiline processing:Java stack traces
Timestamp-based multiline
Filtering and processing
Process logs before sending to UTMStack:filebeat.yml
Performance tuning
Optimize for high volume
filebeat.yml
Resource limits
filebeat.yml
Monitoring
Enable Filebeat monitoring:filebeat.yml
Troubleshooting
Filebeat not starting
Filebeat not starting
-
Validate configuration:
-
Check output connectivity:
-
Review service logs:
-
Verify file permissions:
No logs forwarded to UTMStack
No logs forwarded to UTMStack
-
Check log file paths exist:
-
Verify Filebeat can read files:
-
Check registry for harvested files:
-
Test Logstash connectivity:
High CPU/memory usage
High CPU/memory usage
-
Reduce harvester count:
-
Limit queue size:
- Disable unnecessary processors
- Use include/exclude patterns to reduce file count
Best practices
Next steps
Custom parsers
Parse custom log formats
UTMStack agents
Use agents for better integration
Dashboards
Visualize collected logs
Alerts
Create alerts on log events