Skip to content

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.

  1. You will need a S3 bucket to save the application logs.
  2. 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.

  1. SSH into the instance where Privacera Manager is installed.
  2. Navigate to the config directory using the following command:
    Bash
    cd ~/privacera/privacera-manager/config/
    
  3. Copy vars.monioring.yml file from sample-vars folder to custom-vars folder.

    If this file already exists in custom-vars folder then you can skip this step.

    Bash
    cp sample-vars/vars.monitoring.yml custom-vars/
    
  4. Open vars.monioring.yml.

    Bash
    vi custom-vars/vars.monitoring.yml
    

  5. Uncomment the below variables in the file and save it.

    • Provide the S3 buckte name.
      Bash
      MONITORING_S3_BUCKET_NAME: "<YOUR_S3_BUCKET_NAME>"
      
    • Enable Loki
      Bash
      LOKI_DEPLOYMENT_ENABLED: "true"
      
  6. Once done, redeploy the monitoring components.

    a. Go to privacera-manager directory.

    Bash
    cd ~/privacera/privacera-manager.
    
    b. Run setup to generate the required files.
    Bash
    ./privacera-manager.sh setup
    
    c. Install the monitoring components.
    Bash
    ./pm_with_helm.sh install-monitoring
    
    d. Once done, run post-install.
    Bash
    ./privacera-manager.sh post-install
    

Comments