Loki/Promtail - how to setup own scrape_configs?

1/18/2021

I just installed Loki/Promtail using helm like this:

helm repo add grafana https://grafana.github.io/helm-charts
helm repo update

helm upgrade --install loki grafana/loki-stack --create-namespace --namespace loki-stack --set promtail.enabled=true,loki.persistence.enabled=true,loki.persistence.size=30Gi,loki.persistence.storageClassName=longhorn,config.table_manager.retention_deletes_enabled=true

Now I want to setup my own scrape_configs to aggregate logs from my own application-pods but I'm not sure how to accomplish this (not so familiar with helm):

kubectl describe cm -n loki-stack

shows the scrape_configs currently loaded as default, which is actually just the stuff that K8s/docker produces but my applications logs are missing as they are not part of the default config ...

How can I add my own scrape_configs to this helm setup shown above?

Thanks in advance

-- user14389292
grafana-loki
kubernetes
kubernetes-helm
logging

0 Answers