apiVersion: logging.openshift.io/v1
kind: ClusterLogging
metadata:
name: instance
namespace: openshift-logging
spec:
collection:
logs:
type: vector
vector: {}
# ...
The Red Hat OpenShift Logging Operator deploys a collector based on the ClusterLogForwarder
resource specification. There are two collector options supported by this Operator: the legacy Fluentd collector, and the Vector collector.
Fluentd is deprecated and is planned to be removed in a future release. Red Hat provides bug fixes and support for this feature during the current release lifecycle, but this feature no longer receives enhancements. As an alternative to Fluentd, you can use Vector instead. |
The log collector is a daemon set that deploys pods to each OKD node to collect container and node logs.
By default, the log collector uses the following sources:
System and infrastructure logs generated by journald log messages from the operating system, the container runtime, and OKD.
/var/log/containers/*.log
for all container logs.
If you configure the log collector to collect audit logs, it collects them from /var/log/audit/audit.log
.
The log collector collects the logs from these sources and forwards them internally or externally depending on your logging configuration.
Vector is a log collector offered as an alternative to Fluentd for the logging.
You can configure which logging collector type your cluster uses by modifying the ClusterLogging
custom resource (CR) collection
spec:
apiVersion: logging.openshift.io/v1
kind: ClusterLogging
metadata:
name: instance
namespace: openshift-logging
spec:
collection:
logs:
type: vector
vector: {}
# ...
The container runtimes provide minimal information to identify the source of log messages: project, pod name, and container ID. This information is not sufficient to uniquely identify the source of the logs. If a pod with a given name and project is deleted before the log collector begins processing its logs, information from the API server, such as labels and annotations, might not be available. There might not be a way to distinguish the log messages from a similarly named pod and project or trace the logs to their source. This limitation means that log collection and normalization are considered best effort.
The available container runtimes provide minimal information to identify the source of log messages and do not guarantee unique individual log messages or that these messages can be traced to their source. |
Feature | Fluentd | Vector |
---|---|---|
App container logs |
✓ |
✓ |
App-specific routing |
✓ |
✓ |
App-specific routing by namespace |
✓ |
✓ |
Infra container logs |
✓ |
✓ |
Infra journal logs |
✓ |
✓ |
Kube API audit logs |
✓ |
✓ |
OpenShift API audit logs |
✓ |
✓ |
Open Virtual Network (OVN) audit logs |
✓ |
✓ |
Feature | Fluentd | Vector |
---|---|---|
Elasticsearch certificates |
✓ |
✓ |
Elasticsearch username / password |
✓ |
✓ |
Cloudwatch keys |
✓ |
✓ |
Cloudwatch STS |
✓ |
✓ |
Kafka certificates |
✓ |
✓ |
Kafka username / password |
✓ |
✓ |
Kafka SASL |
✓ |
✓ |
Loki bearer token |
✓ |
✓ |
Feature | Fluentd | Vector |
---|---|---|
Viaq data model - app |
✓ |
✓ |
Viaq data model - infra |
✓ |
✓ |
Viaq data model - infra(journal) |
✓ |
✓ |
Viaq data model - Linux audit |
✓ |
✓ |
Viaq data model - kube-apiserver audit |
✓ |
✓ |
Viaq data model - OpenShift API audit |
✓ |
✓ |
Viaq data model - OVN |
✓ |
✓ |
Loglevel Normalization |
✓ |
✓ |
JSON parsing |
✓ |
✓ |
Structured Index |
✓ |
✓ |
Multiline error detection |
✓ |
✓ |
Multicontainer / split indices |
✓ |
✓ |
Flatten labels |
✓ |
✓ |
CLF static labels |
✓ |
✓ |
Feature | Fluentd | Vector |
---|---|---|
Fluentd readlinelimit |
✓ |
|
Fluentd buffer |
✓ |
|
- chunklimitsize |
✓ |
|
- totallimitsize |
✓ |
|
- overflowaction |
✓ |
|
- flushthreadcount |
✓ |
|
- flushmode |
✓ |
|
- flushinterval |
✓ |
|
- retrywait |
✓ |
|
- retrytype |
✓ |
|
- retrymaxinterval |
✓ |
|
- retrytimeout |
✓ |
Feature | Fluentd | Vector |
---|---|---|
Metrics |
✓ |
✓ |
Dashboard |
✓ |
✓ |
Alerts |
✓ |
✓ |
Feature | Fluentd | Vector |
---|---|---|
Global proxy support |
✓ |
✓ |
x86 support |
✓ |
✓ |
ARM support |
✓ |
✓ |
PowerPC support |
✓ |
✓ |
IBM Z support |
✓ |
✓ |
IPv6 support |
✓ |
✓ |
Log event buffering |
✓ |
|
Disconnected Cluster |
✓ |
✓ |
The following collector outputs are supported:
Feature | Fluentd | Vector |
---|---|---|
Elasticsearch v6-v8 |
✓ |
✓ |
Fluent forward |
✓ |
|
Syslog RFC3164 |
✓ |
✓ (Logging 5.7+) |
Syslog RFC5424 |
✓ |
✓ (Logging 5.7+) |
Kafka |
✓ |
✓ |
Cloudwatch |
✓ |
✓ |
Cloudwatch STS |
✓ |
✓ |
Loki |
✓ |
✓ |
HTTP |
✓ |
✓ (Logging 5.7+) |
Google Cloud Logging |
✓ |
✓ |
Splunk |
✓ (Logging 5.6+) |
Administrators can create ClusterLogForwarder
resources that specify which logs are collected, how they are transformed, and where they are forwarded to.
ClusterLogForwarder
resources can be used up to forward container, infrastructure, and audit logs to specific endpoints within or outside of a cluster. Transport Layer Security (TLS) is supported so that log forwarders can be configured to send logs securely.
Administrators can also authorize RBAC permissions that define which service accounts and users can access and forward which types of logs.