Skip to content
An Helm chart to use Promtail as a sidecar of your application
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci fix ci Mar 13, 2019
helm-chart fix circleci Mar 13, 2019
vendor add vendor Mar 13, 2019
DCO add DCO and LICENSE Mar 13, 2019
Dockerfile Adding example Feb 5, 2019
Gopkg.lock add vendor Mar 13, 2019
Gopkg.toml add vendor Mar 13, 2019
LICENSE add DCO and LICENSE Mar 13, 2019
README.md fix ci Mar 13, 2019
main.go fix help Mar 13, 2019

README.md

This is a Simple logger to demo the use of Promtail as a sidecar to send logs to Loki

Prerequisites

This docs assume:

  • you have loki and grafana already deployed. Please refered to official documentation for installation
  • The logfile you want to scrape is in JSON format

This Helm chart deploy a application pod with 2 containers: - a Golang app writing logs in a separate file. - a Promtail that read that log file and send it to loki.

The file path can be updated via the ./helm/values.yaml file.

sidecar.labels is a map where you can add the labels that will be added to your log entry in Loki.

Example:

  • Logfile located at /home/slog/creator.log
  • Adding labels
    • job: promtail-sidecar
    • test: golang
sidecar:
  logfile:
    path: /home/slog
    filename: creator.log
  labels:
    job: promtail-sidecar
    test: golang
You can’t perform that action at this time.