Skip to content

Installation Guide

Singh, Prabhu (He/Him/His) edited this page Apr 8, 2026 · 7 revisions

Installation Guide

This guide covers installing Logsenta-Engine using Helm charts.

Table of Contents

  1. Prerequisites
  2. Quick Start
  3. Installation Methods
  4. Storage Backend Setup
  5. Verify Installation
  6. Upgrade
  7. Uninstall

Prerequisites

Required

Component Version Description
Kubernetes 1.24+ Target cluster
Helm 3.0+ Package manager
kubectl Latest Cluster access configured

Optional (based on storage backend)

Storage Backend Requirements
PostgreSQL PostgreSQL 12+
MongoDB MongoDB 4.4+
MySQL MySQL 8.0+
Elasticsearch Elasticsearch 7.x/8.x
Azure Log Analytics Azure subscription, Workspace ID, Shared Key
AWS CloudWatch AWS account, IAM credentials or IRSA
GCP Cloud Logging GCP project, Service Account or Workload Identity

Quick Start

Step 1: Clone the Repository

git clone https://github.com/DevOpsArts/logsenta.git
cd logsenta

Step 2: Install with Default Settings

helm install logsenta-engine ./charts/logsenta-engine \
  --namespace logsenta \
  --create-namespace

This installs Logsenta with:

  • File storage (logs written to /logs in the pod)
  • Monitoring default and kube-system namespaces
  • Error pattern detection enabled

Installation Methods

Method 1: From Git Repository (Recommended)

# Clone the repository
git clone https://github.com/DevOpsArts/logsenta.git
cd logsenta

# Install from local chart
helm install logsenta-engine ./charts/logsenta-engine \
  --namespace logsenta \
  --create-namespace \
  --set storage.type=postgresql \
  --set connections.postgresql.host=postgresql.database.svc.cluster.local \
  --set connections.postgresql.username=logsenta \
  --set connections.postgresql.password=<YOUR_PASSWORD>

Method 2: Using Values File

Create a values-production.yaml:

# values-production.yaml
replicaCount: 3

image:
  repository: devopsart1/logsenta-engine
  tag: "0.4.3"

leaderElection:
  enabled: true

storage:
  type: azure

monitoring:
  namespaces:
    - default
    - kube-system
    - production
    - staging

connections:
  azure:
    enabled: true
    workspaceId: ""      # Set via --set
    sharedKey: ""        # Set via --set
    logType: "LogsentaK8sLogs"

scalability:
  maxWorkers: 100
  bufferSize: 5000

resources:
  requests:
    memory: 512Mi
    cpu: 200m
  limits:
    memory: 1Gi
    cpu: 1000m

Install with values file:

helm install logsenta-engine logsenta/logsenta-engine \
  --namespace logsenta \
  --create-namespace \
  -f values-production.yaml \
  --set connections.azure.workspaceId=$AZURE_WORKSPACE_ID \
  --set connections.azure.sharedKey=$AZURE_SHARED_KEY

Storage Backend Setup

PostgreSQL

# Install PostgreSQL (if not exists)
helm install postgresql bitnami/postgresql -n database --create-namespace \
  --set auth.username=logsenta \
  --set auth.password=<STRONG_PASSWORD> \
  --set auth.database=k8s_logs

# Install Logsenta with PostgreSQL
# NOTE: Setting storage.type automatically enables the connection configuration
helm install logsenta-engine ./charts/logsenta-engine \
  --namespace logsenta \
  --create-namespace \
  --set storage.type=postgresql \
  --set connections.postgresql.host=postgresql.database.svc.cluster.local \
  --set connections.postgresql.username=logsenta \
  --set connections.postgresql.password=<STRONG_PASSWORD> \
  --set connections.postgresql.database=k8s_logs

MySQL

# Install MySQL (if not exists)
helm install mysql bitnami/mysql -n database --create-namespace \
  --set auth.rootPassword=<ROOT_PASSWORD> \
  --set auth.username=logsenta \
  --set auth.password=<STRONG_PASSWORD> \
  --set auth.database=k8s_logs

# Install Logsenta with MySQL
helm install logsenta-engine ./charts/logsenta-engine \
  --namespace logsenta \
  --create-namespace \
  --set storage.type=mysql \
  --set connections.mysql.host=mysql.database.svc.cluster.local \
  --set connections.mysql.username=logsenta \
  --set connections.mysql.password=<STRONG_PASSWORD>

MongoDB

# Install MongoDB
helm install mongodb bitnami/mongodb -n database --create-namespace \
  --set auth.rootPassword=<ROOT_PASSWORD> \
  --set auth.username=logsenta \
  --set auth.password=<STRONG_PASSWORD> \
  --set auth.database=k8s_logs

# Install Logsenta with MongoDB
helm install logsenta-engine ./charts/logsenta-engine \
  --namespace logsenta \
  --create-namespace \
  --set storage.type=mongodb \
  --set connections.mongodb.host=mongodb.database.svc.cluster.local \
  --set connections.mongodb.username=logsenta \
  --set connections.mongodb.password=<STRONG_PASSWORD>

Azure Log Analytics

# Get your Azure Log Analytics credentials
# Workspace ID: Azure Portal > Log Analytics Workspace > Agents > Workspace ID
# Shared Key: Azure Portal > Log Analytics Workspace > Agents > Primary Key

helm install logsenta-engine ./charts/logsenta-engine \
  --namespace logsenta \
  --create-namespace \
  --set storage.type=azure \
  --set connections.azure.workspaceId="<WORKSPACE_ID>" \
  --set connections.azure.sharedKey="<PRIMARY_KEY>" \
  --set connections.azure.logType="LogsentaK8sLogs"

Query logs in Azure Portal:

LogsentaK8sLogs_CL
| where TimeGenerated > ago(1h)
| project TimeGenerated, namespace_s, pod_name_s, error_line_s
| order by TimeGenerated desc

AWS CloudWatch

# Using IAM credentials
helm install logsenta-engine ./charts/logsenta-engine \
  --namespace logsenta \
  --create-namespace \
  --set storage.type=aws \
  --set connections.aws.region=us-east-1 \
  --set connections.aws.logGroup=/kubernetes/logsenta \
  --set connections.aws.accessKeyId=$AWS_ACCESS_KEY_ID \
  --set connections.aws.secretAccessKey=$AWS_SECRET_ACCESS_KEY

# Using IRSA (recommended for EKS)
helm install logsenta-engine ./charts/logsenta-engine \
  --namespace logsenta \
  --create-namespace \
  --set storage.type=aws \
  --set connections.aws.region=us-east-1 \
  --set connections.aws.logGroup=/kubernetes/logsenta \
  --set serviceAccount.annotations."eks\.amazonaws\.com/role-arn"=arn:aws:iam::ACCOUNT:role/logsenta-role

GCP Cloud Logging

# Using Workload Identity (recommended for GKE)
helm install logsenta-engine ./charts/logsenta-engine \
  --namespace logsenta \
  --create-namespace \
  --set storage.type=gcp \
  --set connections.gcp.projectId=$GCP_PROJECT_ID \
  --set connections.gcp.logName=logsenta \
  --set serviceAccount.annotations."iam\.gke\.io/gcp-service-account"=logsenta@$GCP_PROJECT_ID.iam.gserviceaccount.com

Elasticsearch

# Install Elasticsearch (if not exists)
helm install elasticsearch elastic/elasticsearch -n logging --create-namespace

# Install Logsenta with Elasticsearch
helm install logsenta-engine ./charts/logsenta-engine \
  --namespace logsenta \
  --create-namespace \
  --set storage.type=elasticsearch \
  --set connections.elasticsearch.hosts="{http://elasticsearch-master.logging.svc.cluster.local:9200}" \
  --set connections.elasticsearch.index=k8s-error-logs

Verify Installation

Check Pod Status

kubectl get pods -n logsenta -l app=logsenta-engine

Expected output:

NAME                               READY   STATUS    RESTARTS   AGE
logsenta-engine-xxxxxxxxxx-xxxxx   1/1     Running   0          2m

Check Logs

kubectl logs -n logsenta -l app=logsenta-engine --tail=50

Expected output:

INFO - Starting Logsenta (Scalable Edition)
INFO - Configuration: max_workers=20, buffer_size=5000, rate_limit=1000.0/s
INFO - Storage backend initialized: AzureLogAnalyticsStorage
INFO - Starting pod watcher (max_workers=20)
INFO - Started monitoring pod: kube-system/coredns-xxx/coredns

Check Configuration

kubectl get configmap logsenta-engine-config -n logsenta -o yaml

Test Error Detection

Create a test pod that generates errors:

kubectl run error-test --image=busybox --restart=Never -- sh -c 'echo "ERROR: Test error message"; sleep 300'

Check if Logsenta captures it:

kubectl logs -n logsenta -l app=logsenta-engine | grep "Error detected"

Upgrade

Upgrade to Latest Version

helm repo update
helm upgrade logsenta-engine logsenta/logsenta-engine \
  --namespace logsenta \
  --reuse-values

Upgrade with New Configuration

helm upgrade logsenta-engine logsenta/logsenta-engine \
  --namespace logsenta \
  --reuse-values \
  --set scalability.maxWorkers=100 \
  --set resources.limits.memory=2Gi

Check Upgrade Status

helm history logsenta-engine -n logsenta
kubectl rollout status deployment/logsenta-engine -n logsenta

Uninstall

Remove Logsenta

helm uninstall logsenta-engine -n logsenta

Remove Namespace (optional)

kubectl delete namespace logsenta

Remove PVCs (if using persistent storage)

kubectl delete pvc -n logsenta -l app=logsenta-engine

Next Steps

Clone this wiki locally