-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
124 lines (101 loc) · 4.22 KB
/
env.example
File metadata and controls
124 lines (101 loc) · 4.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Advanced Log Watcher Configuration
# Copy this file to .env and modify as needed
# =============================================================================
# MONITORING INTERVALS
# =============================================================================
# How often to check for new containers/services (in seconds)
# Lower values = more responsive, higher CPU usage
# Higher values = less responsive, lower CPU usage
# Docker container detection interval
DOCKER_CHECK_INTERVAL=0.1
# System service detection interval
SYSTEM_CHECK_INTERVAL=0.1
# =============================================================================
# LOG CONFIGURATION
# =============================================================================
# Number of historical log lines to show when starting monitoring
LOG_TAIL_LINES=50
# =============================================================================
# ENABLE/DISABLE MONITORING TYPES
# =============================================================================
# Set to 'false' to disable specific monitoring types
# All monitoring types are enabled by default
# Docker container monitoring
ENABLE_DOCKER_MONITORING=true
# System service monitoring (nginx, apache, mysql, etc.)
ENABLE_SYSTEM_MONITORING=true
# File system monitoring (.log files in mounted volumes)
ENABLE_FILE_MONITORING=true
# =============================================================================
# MONITORING BEHAVIOR
# =============================================================================
# File Monitoring Details:
# - Only monitors files with .log extension
# - Auto-detects directories from mounted volumes
# - Uses inotify for instant detection (with polling fallback)
# - Monitors these directories by default: /var/log, /opt/logs, /app/logs
# - To add custom directories, mount them in docker-compose.yml:
# volumes:
# - /your/custom/logs:/your/custom/logs:ro
# Docker Container Classification:
# Containers are automatically classified by name patterns:
# - web: nginx, web, http containers
# - api: api, backend, service containers
# - database: db, mysql, postgres, redis, mongo containers
# - worker: worker, queue, job containers
# - cache: cache, memcache, redis containers
# - proxy: proxy, gateway, router containers
# - monitor: monitor, metrics, stats containers
# - frontend: frontend, ui, client containers
# - container: fallback for unknown containers
# System Service Detection:
# Services are detected by log file paths:
# - nginx: /var/log/nginx/*.log
# - apache: /var/log/apache2/*.log, /var/log/httpd/*.log
# - mysql: /var/log/mysql/error.log
# - postgresql: /var/log/postgresql/*.log
# - redis: /var/log/redis/redis-server.log
# - auth: /var/log/auth.log
# - syslog: /var/log/syslog
# - kernel: /var/log/kern.log
# - And many more...
# =============================================================================
# EXAMPLE CONFIGURATIONS
# =============================================================================
# Development Environment (fast, all monitoring enabled)
# DOCKER_CHECK_INTERVAL=0.1
# SYSTEM_CHECK_INTERVAL=0.1
# ENABLE_DOCKER_MONITORING=true
# ENABLE_SYSTEM_MONITORING=true
# ENABLE_FILE_MONITORING=true
# Production Environment (slower, Docker only)
# DOCKER_CHECK_INTERVAL=1.0
# SYSTEM_CHECK_INTERVAL=5.0
# ENABLE_DOCKER_MONITORING=true
# ENABLE_SYSTEM_MONITORING=false
# ENABLE_FILE_MONITORING=false
# System Monitoring Only (no Docker)
# ENABLE_DOCKER_MONITORING=false
# ENABLE_SYSTEM_MONITORING=true
# ENABLE_FILE_MONITORING=true
# High Performance (minimal monitoring)
# DOCKER_CHECK_INTERVAL=2.0
# SYSTEM_CHECK_INTERVAL=10.0
# ENABLE_DOCKER_MONITORING=true
# ENABLE_SYSTEM_MONITORING=false
# ENABLE_FILE_MONITORING=false
# =============================================================================
# USAGE EXAMPLES
# =============================================================================
# 1. Use defaults (no .env file needed):
# docker compose up --build
# 2. Override specific values:
# ENABLE_DOCKER_MONITORING=false docker compose up
# 3. Use .env file for persistent configuration:
# cp env.example .env
# # Edit .env file
# docker compose up
# 4. Run in background:
# docker compose up -d
# 5. View logs from the watcher itself:
# docker compose logs -f