Log storage
By default, Flows are sent to a centralized log storage deployed inside the cluster. The Logging modules provides 2 options for this storage:
-
OpenSearch (default): forked from ElasticSeach, it's an open-source, distributed suite that provides storage, analytics and querying capabilities for data. SD can install OpenSearch in a single replica, which is suitable for dev/test environments, or using 3 replicas to provide high availability, which is more suitable for production environments.
OpenSearch can be compared to a database, uses an index system for the data and enables full-text search on logs. OpenSearch can be vertically scaled to provide more computational power when needed, for example when the quantity of ingested logs is growing.
-
Grafana Loki: Loki from Grafana Labs, it's an highly-available, distributed system that enables log aggregation. It can be horizontaly scaled and provides multi-tenancy.
Loki uses a time-series databases, saves chuncks of data in an S3-compatible object storage system and does not use and index system. Loki can filter logs using labels (similar to Prometheus) and thanks to it's S3 interface, it enables to save more data and gives you easier access to older logs if compared to OpenSearch.
On the downside, being a distributed system based on micro-services, Loki has more components to be managed.
Remote Storage
When configuring a SD cluster using the furyctl.yaml file, if you specify the Logging module's type to be customOutputs, Logging Operator will be installed with pre-configured Flows without Outputs, which have to be customized by the user, and it will not install a storage solution inside the cluster.
Outputs are defined inside the same furyctl.yaml file and you can specify any Output type supported by Logging Operator. For example, you can send a Flow to a syslog server, send another Flow to an off-cluster Loki instance and all other flow to an S3 bucket in AWS. You can also choose to not send logs from a Flow anywhere using the nullout option.
Example:
spec:
distribution:
modules:
logging:
type: customOutputs
customOutputs:
audit: |-
syslog:
host: SYSLOG-HOST
port: 123
buffer:
timekey: 1m
timekey_wait: 10s
timekey_use_utc: true
events: |-
nullout: {}
infra: |-
s3:
aws_key_id:
value: minio
aws_sec_key:
value: minio123
s3_bucket: infra
s3_region: local
s3_endpoint: 'http://minio.mycompany:9000'
force_path_style: 'true'
path: logs/${tag}/%Y/%m/%d/
buffer:
timekey: 10m
timekey_wait: 30s
timekey_use_utc: true
ingressNginx: |-
nullout: {}
kubernetes: |-
loki:
url: http://loki.mycompany:3100
extract_kubernetes_labels: true
configure_kubernetes_labels: true
extra_labels:
flow: kubernetes
buffer:
timekey: "1m"
timekey_wait: "10s"
timekey_use_utc: true
chunk_limit_size: "2m"
retry_max_interval: "30"
retry_forever: true
overflow_action: "block"
systemdCommon: |-
nullout: {}
systemdEtcd: |-
nullout: {}
errors: |-
nullout: {}
...