From e0c6816c0b5a9a9cfafb688218ab1313528b1c80 Mon Sep 17 00:00:00 2001 From: nilesh Date: Fri, 22 May 2020 09:58:25 -0400 Subject: [PATCH 1/2] documentation update: Fluentd docker image name, UID for docker image, and link to installing as container --- docs/README.md | 3 ++- docs/clients/fluentd/README.md | 10 ++++++---- docs/installation/docker.md | 5 ++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/README.md b/docs/README.md index b98a16f9fe67..3829072dad6b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -19,7 +19,8 @@ simplifies the operation and significantly lowers the cost of Loki. 2. [Installation](installation/README.md) 1. [Installing with Tanka](installation/tanka.md) 2. [Installing with Helm](installation/helm.md) - 3. [Installing Locally](installation/local.md) + 3. [Installing with Docker](installation/docker.md) + 4. [Installing locally](installation/local.md) 3. [Getting Started](getting-started/README.md) 1. [Grafana](getting-started/grafana.md) 2. [LogCLI](getting-started/logcli.md) diff --git a/docs/clients/fluentd/README.md b/docs/clients/fluentd/README.md index 443d604809f3..aaad0a416894 100644 --- a/docs/clients/fluentd/README.md +++ b/docs/clients/fluentd/README.md @@ -1,13 +1,13 @@ # Fluentd Loki has a [Fluentd](https://www.fluentd.org/) output plugin called -`fluent-plugin-grafana-loki` that enables shipping logs to a private Loki +`fluent-plugin-loki` that enables shipping logs to a private Loki instance or [Grafana Cloud](https://grafana.com/oss/loki). ## Installation ``` -$ gem install fluent-plugin-grafana-loki +$ gem install fluent-plugin-loki ``` ## Usage @@ -119,10 +119,12 @@ This plugin automatically adds a `fluentd_thread` label with the name of the buf ## Docker Image -There is a Docker image `grafana/fluent-plugin-grafana-loki:master` which contains [default configuration files](https://github.com/grafana/loki/tree/master/fluentd/fluent-plugin-grafana-loki/docker/conf). By default, fluentd containers use the configurations but you can also specify your `fluentd.conf` with `FLUENTD_CONF` environment variable. +There is a Docker image `grafana/fluent-plugin-loki:master` which contains [default configuration files](https://github.com/grafana/loki/tree/master/fluentd/fluent-plugin-loki/docker/conf). By default, fluentd containers use the configurations but you can also specify your `fluentd.conf` with `FLUENTD_CONF` environment variable. This image also uses `LOKI_URL`, `LOKI_USERNAME`, and `LOKI_PASSWORD` environment variables to specify the Loki's endpoint, user, and password (you can leave the USERNAME and PASSWORD blank if they're not used). +This image will start an instance of Fluentd to forward incoming logs to the specified Loki url. As an alternate, containerized applications can also use [docker driver plugin](../docker-driver/README.md) to ship logs without needing Fluentd. + ### Example A Docker Compose configuration that will work looks like: @@ -130,7 +132,7 @@ A Docker Compose configuration that will work looks like: ``` services: fluentd: - image: grafana/fluent-plugin-grafana-loki:master + image: grafana/fluent-plugin-loki:master command: - "fluentd" - "-v" diff --git a/docs/installation/docker.md b/docs/installation/docker.md index 850ae4b3eedd..3290089cf633 100644 --- a/docs/installation/docker.md +++ b/docs/installation/docker.md @@ -23,7 +23,10 @@ docker run -v $(pwd):/mnt/config -v /var/log:/var/log grafana/promtail:1.5.0 -co When finished, loki-config.yaml and promtail-config.yaml are downloaded in the directory you chose. Docker containers are running Loki and Promtail using those config files. -Navigate to http://localhost:3100/metrics to view the output. +Navigate to http://localhost:3100/metrics to view the metrics and http://localhost:3100/ready for readiness. + +As of v1.5.0, image is configured to run by default as user loki with UID `10001` and GID `10001`. You can use a different user, specially if you are using bind mounts, by specifying uid with docker run command +by specifying `--user=UID` with numeric UID suited to your needs. **Windows** From f08fe1c302a83018402a635e8115a90d76248e5a Mon Sep 17 00:00:00 2001 From: nilesh Date: Fri, 22 May 2020 11:59:47 -0400 Subject: [PATCH 2/2] Reverted to fix the name of the Ruby gem while keeping name change for Docker image --- docs/clients/fluentd/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/clients/fluentd/README.md b/docs/clients/fluentd/README.md index aaad0a416894..d30ae0280dd4 100644 --- a/docs/clients/fluentd/README.md +++ b/docs/clients/fluentd/README.md @@ -1,13 +1,13 @@ # Fluentd Loki has a [Fluentd](https://www.fluentd.org/) output plugin called -`fluent-plugin-loki` that enables shipping logs to a private Loki +`fluent-plugin-grafana-loki` that enables shipping logs to a private Loki instance or [Grafana Cloud](https://grafana.com/oss/loki). ## Installation ``` -$ gem install fluent-plugin-loki +$ gem install fluent-plugin-grafana-loki ``` ## Usage