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
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 >}}
33
47
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.
48
+
1. Verify that your containers are running:
35
49
36
-
Navigate to http://localhost:3100/metrics to view the metrics and http://localhost:3100/ready for readiness.
50
+
```bash
51
+
docker container ls
52
+
```
37
53
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.
54
+
You should see something similar to the following:
39
55
40
-
**Windows**
56
+
```bash
41
57
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.
58
+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
59
+
9485de9ad351 grafana/promtail:2.9.2 "/usr/bin/promtail -…" About a minute ago Up About a minute promtail
60
+
cece1df84519 grafana/loki:2.9.2 "/usr/bin/loki -conf…" About a minute ago Up About a minute 0.0.0.0:3100->3100/tcp, :::3100->3100/tcp loki
61
+
```
62
+
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.
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:2.9.2 --config.file=/mnt/config/loki-config.yaml
49
82
docker run -v <local-path>:/mnt/config -v /var/log:/var/log --link loki grafana/promtail:2.9.2 --config.file=/mnt/config/promtail-config.yaml
50
83
```
51
84
52
-
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.
85
+
1. Verify that Loki is up and running.
53
86
54
-
Navigate to http://localhost:3100/metrics to view the output.
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