feat: Setup a logging system

Loki + Promtail
This commit is contained in:
Nikolai Rodionov 2023-06-17 10:49:16 +02:00
parent 9a05d93451
commit cd506cd969
No known key found for this signature in database
GPG Key ID: 19DB54039EBF8F10
6 changed files with 57 additions and 3 deletions

View File

@ -50,6 +50,16 @@ releases:
- <<: *prometheus - <<: *prometheus
installed: false installed: false
namespace: monitoring-system namespace: monitoring-system
createNamespace: true
- <<: *loki
installed: true
namespace: monitoring-system
createNamespace: false
- <<: *promtail
installed: true
namespace: monitoring-system
createNamespace: false createNamespace: false
bases: bases:

View File

@ -0,0 +1,7 @@
---
singleBinary:
replicas: 1
loki:
auth_enabled: false
commonConfig:
replication_factor: 1

View File

@ -78,4 +78,15 @@ grafana:
gnetId: 14584 gnetId: 14584
revision: 1 revision: 1
datasource: Prometheus datasource: Prometheus
datasources:
loki.yaml:
apiVersion: 1
datasources:
- name: Loki
type: loki
access: proxy
uid: loki
editable: false
url: http://loki.monitoring-system:3100/
jsonData:
maxLines: 1000

View File

@ -0,0 +1,5 @@
---
config:
clients:
# - url: http://loki.monitoring-system:3100
- url: http://loki-gateway/loki/api/v1/push

View File

@ -110,16 +110,37 @@ templates:
- template: default-env-values - template: default-env-values
- template: default-env-secrets - template: default-env-secrets
- template: ext-istio-resource - template: ext-istio-resource
monitoring-common:
labels:
bundle: monitoring
prometheus: &prometheus prometheus: &prometheus
name: prometheus name: prometheus
chart: prometheus-community/kube-prometheus-stack chart: prometheus-community/kube-prometheus-stack
version: 47.1.0 version: 47.1.0
inherit: inherit:
- template: monitoring-common
- template: default-env-values - template: default-env-values
- template: default-env-secrets - template: default-env-secrets
- template: crd-management-hook - template: crd-management-hook
- template: ext-istio-resource - template: ext-istio-resource
loki: &loki
name: loki
chart: grafana/loki
version: 5.6.4
inherit:
- template: monitoring-common
- template: default-env-values
promtail: &promtail
name: promtail
chart: grafana/promtail
version: 6.11.3
inherit:
- template: monitoring-common
- template: default-env-values
# ---------------------------- # ----------------------------
# -- Istio # -- Istio
# ---------------------------- # ----------------------------

View File

@ -26,9 +26,9 @@ repositories:
url: https://argoproj.github.io/argo-helm url: https://argoproj.github.io/argo-helm
- name: bedag - name: bedag
url: https://bedag.github.io/helm-charts/ url: https://bedag.github.io/helm-charts/
# - name: mailu
# url: https://mailu.github.io/helm-charts/
- name: metallb - name: metallb
url: https://metallb.github.io/metallb url: https://metallb.github.io/metallb
- name: prometheus-community - name: prometheus-community
url: https://prometheus-community.github.io/helm-charts url: https://prometheus-community.github.io/helm-charts
- name: grafana
url: https://grafana.github.io/helm-charts