Skip to content

Commit

Permalink
docs: Fix typos and style (#13230)
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Baldry <[email protected]>
  • Loading branch information
jdbaldry authored Jun 20, 2024
1 parent 77cf6fa commit bbc50fd
Showing 1 changed file with 72 additions and 46 deletions.
118 changes: 72 additions & 46 deletions docs/sources/setup/install/local.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
---
title: Local
menuTitle: Install locally
title: Install Grafana Loki locally
menuTitle: Install locally
description: Describes how to install and run Grafana Loki locally.
aliases:
aliases:
- ../../installation/local/
weight: 500
---
# Local

In order to log events with Grafana Loki, download and install both Promtail and Loki.
# Install Grafana Loki locally

To log events with Grafana Loki, download and install both Promtail and Loki.

- Loki is the logging engine.
- Promtail sends logs to Loki.

The configuration specifies running Loki as a single binary.
The configuration runs Loki as a single binary.

## Install using APT or RPM package manager

1. Add Granafa's Advanced Package Tool [APT](https://apt.grafana.com/) or RPM Package Manager [RPM](https://rpm.grafana.com/)
package repository following the linked instructions.
1. Add the Grafana [Advanced Package Tool (APT)](https://apt.grafana.com/) or [RPM Package Manager (RPM)](https://rpm.grafana.com/) package repository following the linked instructions.
1. Install Loki and Promtail
1. Using `dnf`
```
Expand All @@ -31,51 +32,76 @@ The configuration specifies running Loki as a single binary.
```
## Install manually
1. Navigate to the [release page](https://github.com/grafana/loki/releases/).
2. Scroll down to the Assets section under the version that you want to install.
3. Download the Loki and Promtail .zip files that correspond to your system.
Do not download LogCLI or Loki Canary at this time. `LogCLI` allows you to run Loki queries in a command line interface. [Loki Canary]({{< relref "../../operations/loki-canary" >}}) is a tool to audit Loki performance.
4. Unzip the package contents into the same directory. This is where the two programs will run.
5. In the command line, change directory (`cd` on most systems) to the directory with Loki and Promtail. Copy and paste the commands below into your command line to download generic configuration files.
Use the corresponding Git refs that match your downloaded Loki version to get the correct configuration file. For example, if you are using Loki version 2.9.2, you need to use the `https://raw.githubusercontent.com/grafana/loki/v2.9.2/cmd/loki/loki-local-config.yaml` URL to download the configuration file that corresponds to the Loki version you aim to run.
```
wget https://raw.githubusercontent.com/grafana/loki/main/cmd/loki/loki-local-config.yaml
wget https://raw.githubusercontent.com/grafana/loki/main/clients/cmd/promtail/promtail-local-config.yaml
```
6. Enter the following command to start Loki:
**Windows**
```
.\loki-windows-amd64.exe --config.file=loki-local-config.yaml
```
**Linux**
```
./loki-linux-amd64 -config.file=loki-local-config.yaml
```
1. Browse to the [release page](https://github.com/grafana/loki/releases/).
1. Find the **Assets** section for the version that you want to install.
1. Download the Loki and Promtail archive files that correspond to your system.
Don't download LogCLI or Loki Canary at this time.
LogCLI allows you to run Loki queries in a command line interface.
[Loki Canary]({{< relref "../../operations/loki-canary" >}}) is a tool to audit Loki performance.
1. Extract the package contents into the same directory. This is where the two programs will run.
1. In the command line, change directory (`cd` on most systems) to the directory with Loki and Promtail.
Copy and paste the following commands into your command line to download generic configuration files.
Use the Git references that match your downloaded Loki version to get the correct configuration file.
For example, if you are using Loki version 2.9.2, you need to use the `https://raw.githubusercontent.com/grafana/loki/v2.9.2/cmd/loki/loki-local-config.yaml` URL to download the configuration file.
```
wget https://raw.githubusercontent.com/grafana/loki/main/cmd/loki/loki-local-config.yaml
wget https://raw.githubusercontent.com/grafana/loki/main/clients/cmd/promtail/promtail-local-config.yaml
```
1. Run the following command to start Loki:
**Windows**
```
.\loki-windows-amd64.exe --config.file=loki-local-config.yaml
```
**Linux**
```
./loki-linux-amd64 -config.file=loki-local-config.yaml
```
Loki runs and displays Loki logs in your command line and on http://localhost:3100/metrics.
The next step will be running an agent to send logs to Loki.
The next step is running an agent to send logs to Loki.
To do so with Promtail, refer to the [Promtail configuration]({{< relref "../../send-data/promtail" >}}).
## Release binaries - openSUSE Linux only
Every release includes binaries for Loki which can be found on the
[Releases page](https://github.com/grafana/loki/releases).
Every release includes binaries for Loki.
You can find them on the [Releases page](https://github.com/grafana/loki/releases).
## Community openSUSE Linux packages
The community provides packages of Loki for openSUSE Linux. To install:
1. Add the repository `https://download.opensuse.org/repositories/security:/logging/`
to your system. For example, if you are using Leap 15.1, run
`sudo zypper ar https://download.opensuse.org/repositories/security:/logging/openSUSE_Leap_15.1/security:logging.repo ; sudo zypper ref`
2. Install the Loki package with `zypper in loki`
3. Enable the Loki and Promtail services:
- `systemd start loki && systemd enable loki`
- `systemd start promtail && systemd enable promtail`
4. Modify the configuration files as needed: `/etc/loki/promtail.yaml` and
`/etc/loki/loki.yaml`.
The community provides packages of Loki for openSUSE Linux.
To install them:
1. Add the repository `https://download.opensuse.org/repositories/security:/logging/` to your system.
For example, if you are using Leap 15.1, run:
```
sudo zypper ar https://download.opensuse.org/repositories/security:/logging/openSUSE_Leap_15.1/security:logging.repo
sudo zypper ref
```
1. Install the Loki package:
```
zypper in loki
```
1. Start and enable the Loki and Promtail services:
```
systemd start loki
systemd enable loki
systemd start promtail
systemd enable promtail
```
1. Modify the `/etc/loki/promtail.yaml` and `/etc/loki/loki.yaml` configuration files as needed.

0 comments on commit bbc50fd

Please sign in to comment.