Configuring logging in a kubernetes cluster
#loki #fluentbit #grafana #chainlink
Requirements
Stack used
Introduction
Configuring loki
helm repo add grafana https://grafana.github.io/helm-chartsExample of a values.yaml file to configure using nfs storage
# disable service monitor from internal prometheus operator
serviceMonitor:
enabled: false
# disable enterprise feature
enterprise:
enabled: false
loki:
auth_enabled: false
server:
http_listen_port: 3100
grpc_listen_port: 9095
podAnnotations:
### if you have annotations configured for prometheus, uncomment below
# prometheus.io/scrape: "true"
# prometheus.io/port: "3100"
# prometheus.io/path: "metrics"
# prometheus.io/scheme: "http"
limits_config:
enforce_metric_name: false
reject_old_samples: true
reject_old_samples_max_age: 168h
max_cache_freshness_per_query: 10m
split_queries_by_interval: 15m
max_global_streams_per_user: 10000
commonConfig:
# using single binary loki instance, not cluster
replication_factor: 1
storage:
type: "filesystem"
readinessProbe:
httpGet:
path: /ready
port: 3100
initialDelaySeconds: 30
timeoutSeconds: 1
gateway:
# Enable basic auth
basicAuth:
enabled: true
username: "admin"
password: "your_password_here"
singleBinary:
# Use nfs storage
persistence:
enabled: true
type: pvc
storageClass: ssd-nfs-storage
accessModes:
- ReadWriteOnce
size: 2Gi
# Disable cluster
targetModule: "all"
test:
enabled: false
# Disable internal prometheus operator
monitoring:
dashboards:
enabled: false
rules:
enabled: false
alerting: false
serviceMonitor:
enabled: false
selfMonitoring:
enabled: false
grafanaAgent:
installOperator: false
lokiCanary:
enabled: falseUploading the chart
Fluentbit
Configuring log collection
Uploading
Visualizing your data in grafana
Sources
Last updated

