From ffa66edb7309af51dd8ecb4909f423d7fc137b5c Mon Sep 17 00:00:00 2001 From: Robert Fratto Date: Fri, 19 Jul 2019 13:56:33 -0400 Subject: [PATCH] promtail: clarify linux build instructions in docs --- production/README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/production/README.md b/production/README.md index b61b27d24926f..b51f397e4c437 100644 --- a/production/README.md +++ b/production/README.md @@ -64,10 +64,31 @@ $ ./loki -config.file=./cmd/loki/loki-local-config.yaml ... ``` -To run Promtail, use the following commands: +To build Promtail on non-Linux platforms, use the following command: ```bash $ go build ./cmd/promtail +``` + +On Linux, promtail requires the systemd headers to be installed for +Journal support. Promtail can be built with Journal support on Ubuntu +with the following commands: + +```bash +$ sudo apt install libsystemd-dev +$ go build ./cmd/promtail +``` + +Otherwise, to build promtail without Journal support, run `go build` +with CGO disabled: + +```bash +$ CGO_ENABLED=0 go build ./cmd/promtail +``` + +Once Promtail is built, to run Promtail, use the following command: + +```bash $ ./promtail -config.file=./cmd/promtail/promtail-local-config.yaml ... ```