You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/sources/send-data/promtail/installation.md
+36-27
Original file line number
Diff line number
Diff line change
@@ -23,43 +23,52 @@ See the instructions [here](https://grafana.com/docs/loki/<LOKI_VERSION>/setup/i
23
23
24
24
## Install using Docker
25
25
26
-
```bash
27
-
# modify tag to most recent version
28
-
docker pull grafana/promtail:2.9.2
29
-
```
26
+
1. Make sure to modify the tag to the most recent version.
27
+
28
+
```bash
29
+
docker pull grafana/promtail:3.0.0
30
+
```
31
+
32
+
1. Create your Promtail configuration file in a file called `promtail-config.yaml`. Refer to the [Promtail configuration reference](https://grafana.com/docs/loki/<LOKI_VERSION>/send-data/promtail/configuration/) for more details.
33
+
34
+
1. Note that you will need to replace `<local-path>`in the commands with your local path.
35
+
36
+
```bash
37
+
docker run -v <local-path>:/mnt/config -v /var/log:/var/log --link loki grafana/promtail:3.0.0 --config.file=/mnt/config/promtail-config.yaml
38
+
```
30
39
31
40
## Install using Helm
32
41
33
-
Make sure that Helm is installed.
34
-
See [Installing Helm](https://helm.sh/docs/intro/install/).
35
-
Then you can add Grafana's chart repository to Helm:
42
+
1. Make sure that Helm is installed. See [Installing Helm](https://helm.sh/docs/intro/install/).
1. Copy and paste the following commands into your command line to download `loki-local-config.yaml` and `promtail-docker-config.yaml` to your `loki` directory.
1. Copy and paste the following commands into your command line to start the Docker containers using the configuration files you downloaded in the previous step.
The 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 the UID with a `docker run`command and using `--user=UID` with a numeric UID suited to your needs.
46
+
{{< /admonition >}}
47
+
48
+
1. Verify that your containers are running:
33
49
34
-
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.
50
+
```bash
51
+
docker container ls
52
+
```
35
53
36
-
Navigate to http://localhost:3100/metrics to view the metrics and http://localhost:3100/ready for readiness.
54
+
You should see something similar to the following:
37
55
38
-
The 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 the UID with a `docker run` command and using `--user=UID` with numeric UID suited to your needs.
56
+
```bash
39
57
40
-
**Windows**
58
+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
59
+
9485de9ad351 grafana/promtail:3.0.0 "/usr/bin/promtail -…" About a minute ago Up About a minute promtail
60
+
cece1df84519 grafana/loki:3.0.0 "/usr/bin/loki -conf…" About a minute ago Up About a minute 0.0.0.0:3100->3100/tcp, :::3100->3100/tcp loki
61
+
```
41
62
42
-
Copy and paste the commands below into your terminal. Note that you will need to replace the `<placeholders>` in the commands with your local path.
63
+
1. Verify that Loki is up and running.
64
+
65
+
- To view readiness, navigate to http://localhost:3100/ready.
66
+
- To view metrics, navigate to http://localhost:3100/metrics.
67
+
68
+
## Install with Docker on Windows
69
+
70
+
1. Copy and paste the following commands into your command line to download `loki-local-config.yaml` and `promtail-docker-config.yaml` to your `loki` directory. Note that you will need to replace the `<local-path>`in the commands with your local path.
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.
78
+
1. Copy and paste the following commands into your command line to start the Docker containers using the configuration files you downloaded in the previous step. Note that you will need to replace the `<local-path>`in the commands with your local path.
79
+
80
+
```bash
81
+
docker run --name loki -v <local-path>:/mnt/config -p 3100:3100 grafana/loki:3.0.0 --config.file=/mnt/config/loki-config.yaml
82
+
docker run -v <local-path>:/mnt/config -v /var/log:/var/log --link loki grafana/promtail:3.0.0 --config.file=/mnt/config/promtail-config.yaml
83
+
```
53
84
54
-
Navigate to http://localhost:3100/metrics to view the output.
85
+
1. Verify that Loki is up and running.
86
+
87
+
- To view readiness, navigate to http://localhost:3100/ready.
88
+
- To view metrics, navigate to http://localhost:3100/metrics.
55
89
56
90
## Install with Docker Compose
57
91
58
92
Run the following commands in your command line. They work for Windows or Linux systems.
0 commit comments