Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.
/ simple-logger Public archive

An Helm chart to use Promtail as a sidecar of your application

License

Notifications You must be signed in to change notification settings

giantswarm/simple-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An Helm chart to use Promtail as a sidecar of your application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published