Enabling Loki¶
Introduction¶
Loki is a log aggregation system designed for storing and querying logs efficiently. Unlike traditional log management systems, Loki indexes only metadata instead of the full log contents, making it highly scalable and cost-effective. Stores logs in a compressed format with minimal indexing, reducing storage and operational costs.
Note
By default, local storage (i.e. Kubernetes node storage) is used for data storage. To switch to cloud storage, refer to Configure S3 for Loki.
Configure S3 for Loki¶
Ensure that the following prerequisites are met.
- You will need a S3 bucket to save the application logs.
- Your node IAM role should have permission to access the S3 bucket.
Note
The default log retention period of Loki is 30 days
.
Process¶
To enable Loki in the Privacera monitoring stack, follow the steps below.
- SSH into the instance where Privacera Manager is installed.
- Navigate to the
config
directory using the following command:Bash -
Copy
vars.monioring.yml
file fromsample-vars
folder tocustom-vars
folder.If this file already exists in
custom-vars
folder then you can skip this step.Bash -
Open
vars.monioring.yml
.Bash -
Uncomment the below variables in the file and save it.
- Provide the S3 buckte name.
Bash - Enable Loki
Bash
- Provide the S3 buckte name.
-
Once done, redeploy the monitoring components.
a. Go to
privacera-manager
directory.b. RunBash setup
to generate the required files.c. Install the monitoring components.Bash d. Once done, runBash post-install
.Bash