From bc817774bbd531917bc13a8d50390ae61d391fd5 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Wed, 10 Apr 2024 17:26:10 +0100 Subject: Enable scraping of Loki and Loki Canary pod Adds the necessary Pod annotations (prometheus.io/scrape, etc.) to pods to have Prometheus service discovery automatically pick up on them and start scraping. --- kubernetes/namespaces/loki/loki_values.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'kubernetes/namespaces') diff --git a/kubernetes/namespaces/loki/loki_values.yml b/kubernetes/namespaces/loki/loki_values.yml index b2dd274..5d016b2 100644 --- a/kubernetes/namespaces/loki/loki_values.yml +++ b/kubernetes/namespaces/loki/loki_values.yml @@ -47,6 +47,11 @@ singleBinary: - name: var-loki-tmpfs mountPath: /var/loki + # Add labels to enable Prometheus scraping of Loki replicas + podAnnotations: + prometheus.io/scrape: "true" + prometheus.io/port: "http-metrics" + # Reduce the memory on the memcached cluster (defaults to 8GB) chunksCache: allocatedMemory: 1024 @@ -62,3 +67,9 @@ backend: # Enable Minio for S3 storage minio: enabled: true + +# Enable Prometheus scraping of the Loki Canaries +lokiCanary: + annotations: + prometheus.io/scrape: "true" + prometheus.io/port: "http-metrics" -- cgit v1.2.3