v0.2.0 restructured to pipeline architecture, dirty
This commit is contained in:
@ -1,40 +1,44 @@
|
||||
# LogWisp Minimal Configuration
|
||||
# Save as: ~/.config/logwisp.toml
|
||||
|
||||
# Basic stream monitoring application logs
|
||||
[[streams]]
|
||||
# Basic pipeline monitoring application logs
|
||||
[[pipelines]]
|
||||
name = "app"
|
||||
|
||||
[streams.monitor]
|
||||
check_interval_ms = 100
|
||||
targets = [
|
||||
{ path = "/var/log/myapp", pattern = "*.log", is_file = false }
|
||||
]
|
||||
# Source: Monitor log directory
|
||||
[[pipelines.sources]]
|
||||
type = "directory"
|
||||
options = { path = "/var/log/myapp", pattern = "*.log", check_interval_ms = 100 }
|
||||
|
||||
[streams.httpserver]
|
||||
enabled = true
|
||||
port = 8080
|
||||
stream_path = "/stream"
|
||||
status_path = "/status"
|
||||
# Sink: HTTP streaming
|
||||
[[pipelines.sinks]]
|
||||
type = "http"
|
||||
options = {
|
||||
port = 8080,
|
||||
buffer_size = 1000,
|
||||
stream_path = "/stream",
|
||||
status_path = "/status"
|
||||
}
|
||||
|
||||
# Optional additions:
|
||||
|
||||
# 1. Filter for errors only:
|
||||
# [[streams.filters]]
|
||||
# [[pipelines.filters]]
|
||||
# type = "include"
|
||||
# patterns = ["ERROR", "WARN", "CRITICAL", "FATAL"]
|
||||
|
||||
# 2. Enable rate limiting:
|
||||
# [streams.httpserver.rate_limit]
|
||||
# enabled = true
|
||||
# requests_per_second = 10.0
|
||||
# burst_size = 20
|
||||
# limit_by = "ip"
|
||||
# Modify the sink options above:
|
||||
# options = {
|
||||
# port = 8080,
|
||||
# buffer_size = 1000,
|
||||
# rate_limit = { enabled = true, requests_per_second = 10.0, burst_size = 20 }
|
||||
# }
|
||||
|
||||
# 3. Add heartbeat:
|
||||
# [streams.httpserver.heartbeat]
|
||||
# enabled = true
|
||||
# interval_seconds = 30
|
||||
# 3. Add file output:
|
||||
# [[pipelines.sinks]]
|
||||
# type = "file"
|
||||
# options = { directory = "/var/log/logwisp", name = "app" }
|
||||
|
||||
# 4. Change LogWisp's own logging:
|
||||
# [logging]
|
||||
|
||||
Reference in New Issue
Block a user