I just want to add the ruler configuration, so I can have alerts for Loki metrics.
However that seems quite a challenge.
That is my configuration for Grafana Loki:
replicaCount: 1
affinity: {}
loki:
read:
extraVolumeMounts:
- name: loki-rules-config
mountPath: /etc/loki/rules
- name: loki-rules-config
configMap:
name: loki-rules-config
ruler:
enabled: true
config:
rule_path: /etc/loki/rules
storage:
type: filesystem
config:
directory: /var/loki/rules
service:
type: ClusterIP
config:
query_scheduler:
max_outstanding_requests_per_tenant: 4096
limits_config:
split_queries_by_interval: 24h
max_query_parallelism: 100
frontend:
max_outstanding_per_tenant: 4096
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: "nginx-internal"
hosts:
- "dada.dada-dada.dada.de"
fluent-bit:
enabled: false
promtail:
enabled: true
serviceMonitor:
enabled: true
I tried manually adding the configmap, and then referencing it inside the chart, doesn’t work. It just doesn’t pick it up. Has anyone already implement Loki stack chart and made it work?
2
Answers
Looking at the Loki stack Helm chart values, I don’t see any reference to the ruler. I suspect it may not be supported.
The recommended helm chart for Loki is the officially supported one. Looking at its values, there’s is a
loki.rulerConfig
field you can configure.Official loki chart can be used for both single binary deployment and simple scalable deployment (SSD).
By default it runs SSD with 3 replicas of each role (3 readers, 3 writers and 3 backend services).
Nothing stops you from running SSD as following:
Using this in
values.yaml
, you will get single replica for each role.Moreover you can use single binary deployment as following:
And you will get one statefulset for single binary handling all roles at once and deployment for gateway (which is used for accessing Loki from outside or from cluster).