Overview
Configuration¶
The configuration of Loggie is mainly divided into two categories:
System Configuration¶
The global system configuration, which can be assigned by -config.system
in CMD arguments, includes the following:
- monitor: monitor related configuration
- discovery: service discovery and configuration delivery
- reload: hot reload for dynamic configuration
- defaults: global default configuration
- http: http port used for management and monitoring
loggie.yml
# loggie.yml
loggie:
monitor:
logger:
period: 30s
enabled: true
listeners:
filesource: ~
filewatcher: ~
reload: ~
sink: ~
discovery:
enabled: false
reload:
enabled: true
period: 10s
defaults:
sink:
type: dev
sources:
- type: file
watcher:
cleanFiles:
maxHistory: 1
http:
enabled: true
port: 9196
Pipeline Configuration¶
Pipeline configuration, specified by -config.pipeline
in CMD arguments, indicates the Source, Sink, Queue and Interceptor used by the pipeline.
- Source: Multiple Sources can be configured for each Pipeline.
- Interceptor: Multiple Interceptors can be configured for each Pipeline.
- Sink: One Sink can be configured for each Pipeline.
- Queue: The default is the channel queue. Generally no configuration is required
pipeline.yml
pipelines:
- name: demo # pipeline name, required
sources:
- type: ${sourceType}
name: access # source name, required
...
interceptors:
- type: ${interceptorType}
...
sink:
type: ${sinkType}
...
Kubernetes CRD¶
Loggie defines the following CRDs for issuing configurations in Kubernetes:
-
LogConfig: namespace level, representing a Pipeline configuration that can be used to collect container logs of Pods.
-
ClusterLogConfig: cluster level, indicating a pipeline configuration, used for cluster-level cross-Namespace collection of Pod container logs, collection of logs on Node nodes, and distribution of general pipeline configuration for a Loggie cluster.
-
Sink: cluster level, representing a sink configuration, which can be referenced in LogConfig/ClusterLogConfig.
-
Interceptors: cluster level, representing an interceptors group, which can be referenced in LogConfig.
Note
The pipeline in ClusterLogConfig/LogConfig can define sink and interceptor, which are used for the sink/interceptor of this pipeline. If you want to reuse sinks or interceptors in multiple ClusterLogConfig/LogConfig, you can create a Sink/Interceptor CR and use sinkRef/interceptorRef in ClusterLogConfig/LogConfig for reference.