:_mod-docs-content-type: ASSEMBLY
include::_attributes/common-attributes.adoc[leveloffset=+1]
[id="log6x-loki-6-2"]
= Storing logs with LokiStack
:context: log6x-loki-6.2

toc::[]

You can configure a `LokiStack` custom resource (CR) to store application, audit, and infrastructure-related logs.

include::snippets/log6x-loki-statement-snip.adoc[leveloffset=+1]

include::modules/log6x-loki-sizing.adoc[leveloffset=+1]

[id="prerequisites-6-2_{context}"]
== Prerequisites

* You have installed the {loki-op} by using the command-line interface (CLI) or web console.
* You have created a `serviceAccount` CR in the same namespace as the `ClusterLogForwarder` CR.
* You have assigned the `collect-audit-logs`, `collect-application-logs`, and `collect-infrastructure-logs` cluster roles to the `serviceAccount` CR.

[id="setup-6-2_{context}"]
== Core set up and configuration

Use role-based access controls, basic monitoring, and pod placement to deploy Loki.

include::modules/log6x-loki-rbac-rules-perms.adoc[leveloffset=+1]
include::modules/log6x-enabling-loki-alerts.adoc[leveloffset=+1]
include::modules/log6x-loki-memberlist-ip.adoc[leveloffset=+1]
include::modules/log6x-loki-retention.adoc[leveloffset=+1]
include::modules/log6x-loki-pod-placement.adoc[leveloffset=+1]

[id="performance-6-2_{context}"]
== Enhanced reliability and performance

Use the following configurations to ensure reliability and efficiency of Loki in production.

include::modules/log6x-identity-federation.adoc[leveloffset=+1]
include::modules/log6x-loki-reliability-hardening.adoc[leveloffset=+1]
include::modules/log6x-loki-restart-hardening.adoc[leveloffset=+1]

[id="advanced-6-2_{context}"]
== Advanced deployment and scalability

To configure high availability, scalability, and error handling, use the following information.

include::modules/log6x-loki-zone-aware-rep.adoc[leveloffset=+1]
include::modules/log6x-loki-zone-fail-recovery.adoc[leveloffset=+1]
include::modules/log6x-loki-rate-limit-errors.adoc[leveloffset=+1]
