Skip to main content

Log Sources Configuration

This page documents how to configure log sources in Live Log Insight.

Configuration File

Log sources are defined in src/agentX/config/log_sources.yaml.

Structure

sources:
  - type: filesystem
    path: /var/log
    name: app-logs
    environments: [local, staging, production]
    services: [all]
    
  - type: elasticsearch
    name: production-logs
    host: es.example.com
    port: 9200
    index: "auth-service-*"
    environments: [production]
    services: [auth-service]

Source Types

Filesystem

For local log files:
- type: filesystem
  path: /var/log/myapp
  name: application-logs
  pattern: "*.log"
  recursive: false
FieldRequiredDescription
typeYesMust be “filesystem”
pathYesDirectory path to log files
nameYesHuman-readable name
patternNoFile glob pattern
recursiveNoSearch subdirectories (default: false)

Elasticsearch

For Elasticsearch indices:
- type: elasticsearch
  host: es.example.com
  port: 9200
  index: "auth-service-*"
  name: elasticsearch-logs
  username: elastic
  password: ${ES_PASSWORD}
  ssl: true
FieldRequiredDescription
typeYesMust be “elasticsearch”
hostYesElasticsearch host
portYesElasticsearch port
indexYesIndex pattern
nameYesHuman-readable name
usernameNoBasic auth username
passwordNoBasic auth password (use env vars)
sslNoUse HTTPS (default: true)

Environment Filtering

Filter sources by environment:
sources:
  - type: filesystem
    path: /var/log/local
    name: local-logs
    environments: [local]
    
  - type: elasticsearch
    host: es-prod.example.com
    name: production-logs
    environments: [production]