Prerequisites
- Docker installed on your edge device
- Network connectivity to
api.logfleet.io - An API key with edge permissions (see Authentication)
Architecture
Each edge location runs:Quick Start
1. Create an API Key
raw_key from the response.
2. Deploy with Docker
3. Verify Connection
online.
Configuration Options
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
LOGFLEET_API_KEY | Yes | - | API key for authentication |
LOGFLEET_API_URL | Yes | - | LogFleet API endpoint |
AGENT_NAME | Yes | - | Unique name for this agent |
LOG_PATHS | No | /var/log | Comma-separated paths to monitor |
HEARTBEAT_INTERVAL | No | 30s | Heartbeat frequency |
METRICS_INTERVAL | No | 60s | Metrics push frequency |
CONFIG_SYNC_INTERVAL | No | 60s | Config sync frequency |
LOKI_RETENTION | No | 7d | Local log retention period |
LOKI_MAX_SIZE | No | 10GB | Maximum local storage |
Docker Compose
For production deployments, use Docker Compose:Kubernetes
For Kubernetes deployments:Multiple Log Sources
Configure Vector to collect from multiple sources:Offline Operation
Edge agents are designed to work offline:- Local Storage: Logs are stored in Loki with configurable retention
- Metrics Buffer: Metrics are buffered locally if cloud is unreachable
- Auto-Retry: Automatic reconnection when connectivity is restored
- No Data Loss: Buffered data is pushed when connection resumes
Monitoring Agent Health
Dashboard
View agent status in the LogFleet dashboard:- Online/Offline status
- Last heartbeat time
- Metrics throughput
- Storage usage
API
Check agent health programmatically:Troubleshooting
Agent not appearing in dashboard
Agent not appearing in dashboard
- Check the API key has
edge:registerpermission - Verify network connectivity:
curl https://api.logfleet.io/health - Check agent logs:
docker logs logfleet-agent - Ensure
AGENT_NAMEis unique within your organization
Agent shows as offline
Agent shows as offline
- Verify heartbeat interval isn’t too long
- Check for network issues between agent and cloud
- Ensure the API key hasn’t been revoked
- Check agent logs for errors
Logs not appearing in streams
Logs not appearing in streams
- Verify log paths are correctly mounted
- Check file permissions (agent needs read access)
- Ensure log files are being written to
- Check Vector configuration for parsing errors
High memory usage
High memory usage
- Reduce
LOKI_MAX_SIZEto limit storage - Decrease
LOKI_RETENTIONto delete older logs faster - Check for log storms (high volume log generation)
- Consider filtering out verbose logs at the source
Security Best Practices
Minimal Permissions
Only grant the API key permissions the agent actually needs.
Rotate Keys
Periodically rotate API keys and revoke old ones.
Network Isolation
Restrict agent network access to only LogFleet endpoints.
Read-Only Mounts
Mount log directories as read-only to prevent accidental writes.