feat: enable log collection for prod environment

- Enable logIngest for chat and freeleaps services in prod
- Add Loki datasource to Grafana for prod environment
- Configure Loki log retention policy (30 days)
- Enable table manager for automatic log cleanup
This commit is contained in:
Nicolas 2025-08-13 09:41:25 +08:00
parent c9d13d533f
commit 31f959f7a9
4 changed files with 26 additions and 8 deletions

View File

@ -3762,7 +3762,7 @@ monitoring:
# contained index types like 'boltdb-shipper' and 'tsdb'. This will be removed in a future helm chart. # contained index types like 'boltdb-shipper' and 'tsdb'. This will be removed in a future helm chart.
tableManager: tableManager:
# -- Specifies whether the table-manager should be enabled # -- Specifies whether the table-manager should be enabled
enabled: false enabled: true
image: image:
# -- The Docker registry for the table-manager image. Overrides `loki.image.registry` # -- The Docker registry for the table-manager image. Overrides `loki.image.registry`
registry: null registry: null
@ -3817,6 +3817,6 @@ tableManager:
# -- Tolerations for table-manager pods # -- Tolerations for table-manager pods
tolerations: [] tolerations: []
# -- Enable deletes by retention # -- Enable deletes by retention
retention_deletes_enabled: false retention_deletes_enabled: true
# -- Set retention period # -- Set retention period
retention_period: 0 retention_period: 30d

View File

@ -1165,7 +1165,15 @@ grafana:
## Configure additional grafana datasources (passed through tpl) ## Configure additional grafana datasources (passed through tpl)
## ref: http://docs.grafana.org/administration/provisioning/#datasources ## ref: http://docs.grafana.org/administration/provisioning/#datasources
additionalDataSources: [] additionalDataSources:
- name: Loki
type: loki
url: http://loki-gateway.freeleaps-logging-system
access: proxy
editable: false
jsonData:
maxLines: 1000
timeout: 30
# - name: prometheus-sample # - name: prometheus-sample
# access: proxy # access: proxy
# basicAuth: true # basicAuth: true

View File

@ -8,6 +8,11 @@ dashboard:
name: freeleaps-prod-chat-dashboard name: freeleaps-prod-chat-dashboard
title: Chat Service Dashboard (PROD) title: Chat Service Dashboard (PROD)
metricsPrefix: freeleaps_chat metricsPrefix: freeleaps_chat
logIngest:
enabled: true
lokiEndpoint: http://loki-gateway.freeleaps-logging-system
logPathPattern: /app/log/chat/*.log
logPath: /app/log/chat
chat: chat:
replicas: 1 replicas: 1
image: image:

View File

@ -8,6 +8,11 @@ dashboard:
name: freeleaps-prod-backend-dashboard name: freeleaps-prod-backend-dashboard
title: Backend Service Dashboard (PROD) title: Backend Service Dashboard (PROD)
metricsPrefix: freeleaps_backend metricsPrefix: freeleaps_backend
logIngest:
enabled: true
lokiEndpoint: http://loki-gateway.freeleaps-logging-system
logPathPattern: /app/log/freeleaps/*.log
logPath: /app/log/freeleaps
freeleaps: freeleaps:
replicas: 1 replicas: 1
image: image: