fastcheck/server/src/config/elasticsearch.env.example
2026-04-08 13:58:46 -04:00

58 lines
1.6 KiB
Plaintext

# Elasticsearch Configuration for Multi-Index Logging
# Copy this file to .env and configure according to your setup
# Enable/Disable ELK logging
ELK_ENABLED=true
# Elasticsearch connection settings
ELASTICSEARCH_URL=http://localhost:9200
ELASTICSEARCH_USERNAME=elastic
ELASTICSEARCH_PASSWORD=changeme
# Base index name (will be used to create multiple indices)
# The following indices will be created:
# - {ELASTICSEARCH_INDEX}-requests (HTTP request logs)
# - {ELASTICSEARCH_INDEX}-business (Business event logs)
# - {ELASTICSEARCH_INDEX}-errors (System error logs)
# - {ELASTICSEARCH_INDEX}-general (General application logs)
ELASTICSEARCH_INDEX=duxiter-logs
# Log level for winston logger
LOG_LEVEL=info
# Environment (affects log retention and indexing strategies)
NODE_ENV=development
# Index Configuration Examples:
# For development:
# ELASTICSEARCH_INDEX=duxiter-dev-logs
# For staging:
# ELASTICSEARCH_INDEX=duxiter-staging-logs
# For production:
# ELASTICSEARCH_INDEX=duxiter-prod-logs
# Index Lifecycle Management (ILM) Settings
# These are handled automatically by the index manager
# but can be customized in elasticsearch-mappings.ts
# HTTP Request Logs Index:
# - Hot phase: 30 days, max 50GB
# - Warm phase: after 30 days, 0 replicas
# - Delete: after 90 days
# Business Event Logs Index:
# - Hot phase: 7 days, max 10GB
# - Warm phase: after 7 days, 0 replicas
# - Delete: after 365 days (1 year)
# System Error Logs Index:
# - Hot phase: 7 days, max 5GB
# - Warm phase: after 7 days, 1 replica
# - Delete: after 180 days (6 months)
# General Logs Index:
# - Hot phase: 30 days, max 20GB
# - Warm phase: after 30 days, 0 replicas
# - Delete: after 60 days