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

toc::[]

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

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

[id="prerequisites_{context}"]
== Prerequisites

* You have installed the {loki-op} by using the CLI or web console.
* You have a `serviceAccount` in the same namespace in which you create the `ClusterLogForwarder`.
* The `serviceAccount` is assigned `collect-audit-logs`, `collect-application-logs`, and `collect-infrastructure-logs` cluster roles.

[id="setup_{context}"]
== Core Setup and Configuration
*Role-based access controls, basic monitoring, and pod placement to deploy Loki.*

include::modules/log6x-loki-sizing.adoc[leveloffset=+1]
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_{context}"]
== Enhanced Reliability and Performance
*Configurations to ensure Loki’s reliability and efficiency 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_{context}"]
== Advanced Deployment and Scalability
*Specialized configurations for high availability, scalability, and error handling.*

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]
