Skip to content

standalone logging docs - first pass at base 6.0 docs #92457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _attributes/common-attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,10 @@ endif::openshift-origin[]

:LoggingProductName: OpenShift Logging
:LoggingProductShortName: Logging


:ocp-product-title: OpenShift Container Platform
:ocp-product-version: 4.13
:dedicated-product-title: OpenShift Dedicated
:aro-product-title: Azure Red Hat OpenShift
:rosa-product-title: Red Hat OpenShift Service on AWS
31 changes: 28 additions & 3 deletions _topic_maps/_topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,32 @@ Name: About OpenShift Logging
Dir: about
Distros: openshift-logging
Topics:
- Name: OpenShift Logging overview
- Name: Logging overview
File: about-logging
- Name: Logging
File: log6x-about
- Name: Cluster logging support
File: cluster-logging-support
- Name: Visualization for logging
File: logging-visualization
---
Name: Installing
Dir: installing
Distros: openshift-logging
Topics:
- Name: Installing logging
File: installing-logging
---
Name: Configuring
Dir: configuring
Distros: openshift-logging
Topics:
- Name: Configuring log forwarding
File: configuring-log-forwarding
- Name: Configuring LokiStack storage
File: configuring-lokistack-storage
---
Name: Upgrading
Dir: upgrading
Distros: openshift-logging
Topics:
- Name: Upgrading to Logging 6.0
File: upgrading-to-logging-60
172 changes: 169 additions & 3 deletions about/about-logging.adoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,175 @@
:_content-type: ASSEMBLY
:_mod-docs-content-type: ASSEMBLY
include::_attributes/common-attributes.adoc[]
[id="about-logging"]
= {LoggingProductName} overview
= {product-title} overview
:context: about-logging

toc::[]

Welcome to logging
The `ClusterLogForwarder` custom resource (CR) is the central configuration point for log collection and forwarding.

== Inputs and Outputs

Inputs specify the sources of logs to be forwarded. Logging provides the following built-in input types that select logs from different parts of your cluster:

* `application`
* `receiver`
* `infrastructure`
* `audit`

You can also define custom inputs based on namespaces or pod labels to fine-tune log selection.

Outputs define the destinations where logs are sent. Each output type has its own set of configuration options, allowing you to customize the behavior and authentication settings.


== Receiver Input Type
The receiver input type enables the Logging system to accept logs from external sources. It supports two formats for receiving logs: `http` and `syslog`.

The `ReceiverSpec` field defines the configuration for a receiver input.

== Pipelines and Filters

Pipelines determine the flow of logs from inputs to outputs. A pipeline consists of one or more input refs, output refs, and optional filter refs. You can use filters to transform or drop log messages within a pipeline. The order of filters matters, as they are applied sequentially, and earlier filters can prevent log messages from reaching later stages.

== Operator Behavior

The Cluster Logging Operator manages the deployment and configuration of the collector based on the `managementState` field:

- When set to `Managed` (default), the Operator actively manages the logging resources to match the configuration defined in the spec.
- When set to `Unmanaged`, the Operator does not take any action, allowing you to manually manage the logging components.

== Validation
Logging includes extensive validation rules and default values to ensure a smooth and error-free configuration experience. The `ClusterLogForwarder` resource enforces validation checks on required fields, dependencies between fields, and the format of input values. Default values are provided for certain fields, reducing the need for explicit configuration in common scenarios.

== Quick Start

.Prerequisites
* You have access to an {ocp-product-title} cluster with `cluster-admin` permissions.
* You installed the {oc-first}.
* You have access to a supported object store. For example, AWS S3, Google Cloud Storage, {azure-short}, Swift, Minio, or {rh-storage}.

.Procedure

. Install the `{clo}`, `{loki-op}`, and `{coo-first}` from OperatorHub.

. Create a secret to access an existing object storage bucket:
+
.Example command for AWS
[source,terminal,subs="+quotes"]
----
$ oc create secret generic logging-loki-s3 \
--from-literal=bucketnames="<bucket_name>" \
--from-literal=endpoint="<aws_bucket_endpoint>" \
--from-literal=access_key_id="<aws_access_key_id>" \
--from-literal=access_key_secret="<aws_access_key_secret>" \
--from-literal=region="<aws_region_of_your_bucket>" \
-n openshift-logging
----

. Create a `LokiStack` custom resource (CR) in the `openshift-logging` namespace:
+
[source,yaml]
----
apiVersion: loki.grafana.com/v1
kind: LokiStack
metadata:
name: logging-loki
namespace: openshift-logging
spec:
managementState: Managed
size: 1x.extra-small
storage:
schemas:
- effectiveDate: '2022-06-01'
version: v13
secret:
name: logging-loki-s3
type: s3
storageClassName: gp3-csi
tenants:
mode: openshift-logging
----

. Create a service account for the collector:
+
[source,shell]
----
$ oc create sa collector -n openshift-logging
----

. Bind the `ClusterRole` to the service account:
+
[source,shell]
----
$ oc adm policy add-cluster-role-to-user logging-collector-logs-writer -z collector -n openshift-logging
----

. Create a `UIPlugin` to enable the Log section in the Observe tab:
+
[source,yaml]
----
apiVersion: observability.openshift.io/v1alpha1
kind: UIPlugin
metadata:
name: logging
spec:
type: Logging
logging:
lokiStack:
name: logging-loki
----

. Add additional roles to the collector service account:
+
[source,shell]
----
$ oc adm policy add-cluster-role-to-user collect-application-logs -z collector -n openshift-logging
----
+
[source,terminal]
----
$ oc adm policy add-cluster-role-to-user collect-audit-logs -z collector -n openshift-logging
----
+
[source,terminal]
----
$ oc adm policy add-cluster-role-to-user collect-infrastructure-logs -z collector -n openshift-logging
----

. Create a `ClusterLogForwarder` CR to configure log forwarding:
+
[source,yaml]
----
apiVersion: observability.openshift.io/v1
kind: ClusterLogForwarder
metadata:
name: collector
namespace: openshift-logging
spec:
serviceAccount:
name: collector
outputs:
- name: default-lokistack
type: lokiStack
lokiStack:
target:
name: logging-loki
namespace: openshift-logging
authentication:
token:
from: serviceAccount
tls:
ca:
key: service-ca.crt
configMapName: openshift-service-ca.crt
pipelines:
- name: default-logstore
inputRefs:
- application
- infrastructure
outputRefs:
- default-lokistack
----

.Verification
* Verify that logs are visible in the *Log* section of the *Observe* tab in the {ocp-product-title} web console.
49 changes: 49 additions & 0 deletions about/cluster-logging-support.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
:_mod-docs-content-type: ASSEMBLY
[id="cluster-logging-support"]
= Cluster logging support
include::_attributes/common-attributes.adoc[]
:context: cluster-logging-support

toc::[]

include::snippets/logging-supported-config-snip.adoc[]
include::snippets/logging-compatibility-snip.adoc[]
include::snippets/logging-loki-statement-snip.adoc[]

{logging-uc} {for} is an opinionated collector and normalizer of application, infrastructure, and audit logs. It is intended to be used for forwarding logs to various supported systems.

{logging-uc} is not:

* A high scale log collection system
* Security Information and Event Monitoring (SIEM) compliant
* A "bring your own" (BYO) log collector configuration
* Historical or long term log retention or storage
* A guaranteed log sink
* Secure storage - audit logs are not stored by default

[id="cluster-logging-support-CRDs_{context}"]
== Supported API custom resource definitions

The following table describes the supported {logging-uc} APIs.

include::snippets/logging-api-support-states-snip.adoc[]

include::modules/cluster-logging-maintenance-support-list-6x.adoc[leveloffset=+1]
include::modules/unmanaged-operators.adoc[leveloffset=+1]

//[id="support-exception-for-coo-logging-ui-plugin_{context}"]
//== Support exception for the Logging UI Plugin
//
//Until the approaching General Availability (GA) release of the Cluster Observability Operator (COO), which is currently in link:https://access.redhat.com/support/offerings/techpreview/[Technology Preview] (TP), Red{nbsp}Hat provides support to customers who are using Logging 6.0 or later with the COO for its Logging UI Plugin on {ocp-product-title} 4.14 or later. This support exception is temporary as the COO includes several independent features, some of which are still TP features, but the Logging UI Plugin is ready for GA.
//

[id="cluster-logging-support-must-gather_{context}"]
== Collecting {logging} data for Red Hat Support

When opening a support case, it is helpful to provide debugging information about your cluster to Red{nbsp}Hat Support.

You can use the link:https://docs.openshift.com/container-platform/latest/support/gathering-cluster-data.html#gathering-cluster-data[must-gather tool] to collect diagnostic information for project-level resources, cluster-level resources, and each of the {logging} components.
For prompt support, supply diagnostic information for both {ocp-product-title} and {logging}.

include::modules/cluster-logging-must-gather-about.adoc[leveloffset=+2]
include::modules/cluster-logging-must-gather-collecting.adoc[leveloffset=+2]
65 changes: 0 additions & 65 deletions about/log6x-about.adoc

This file was deleted.

9 changes: 9 additions & 0 deletions about/logging-visualization.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:_mod-docs-content-type: ASSEMBLY
[id="logging-visualization"]
= Visualization for logging
include::_attributes/common-attributes.adoc[]
:context: logging-visualization

toc::[]

Visualization for logging is provided by deploying the link:https://docs.openshift.com/container-platform/latest/observability/cluster_observability_operator/ui_plugins/logging-ui-plugin.adoc#logging-ui-plugin[Logging UI Plugin] of the link:https://docs.openshift.com/container-platform/latest/observability/cluster_observability_operator/cluster-observability-operator-overview.adoc#cluster-observability-operator-overview[Cluster Observability Operator], which requires Operator installation.
1 change: 1 addition & 0 deletions configuring/_attributes
Loading