Skip to content

Commit 6978ee5

Browse files
authored
Loki Release: update release notes and docs (#2808)
* update release notes and docs! * add go and cortex version * tweaks * tweak wording * change paths * typo, thanks Cyril ;) * thanks Owen ;)
1 parent fa00b90 commit 6978ee5

File tree

12 files changed

+838
-514
lines changed

12 files changed

+838
-514
lines changed

CHANGELOG.md

+210
Large diffs are not rendered by default.

docs/sources/alerting/_index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ weight: 700
77

88
Loki includes a component called the Ruler, adapted from our upstream project, Cortex. The Ruler is responsible for continually evaluating a set of configurable queries and then alerting when certain conditions happen, e.g. a high percentage of error logs.
99

10-
First, ensure the Ruler component is enabled. The following is a basic configuration which loads rules from configuration files (it requires `/tmp/rules` and `/tmp/scratch` exist):
10+
First, ensure the Ruler component is enabled. The following is a basic configuration which loads rules from configuration files:
1111

1212
```yaml
1313
ruler:
@@ -168,6 +168,8 @@ Because the rule files are identical to Prometheus rule files, we can interact w
168168

169169
> **Note:** Not all commands in cortextool currently support Loki.
170170

171+
> **Note:** cortextool was intended to run against multi-tenant Loki, commands need an `--id=` flag set to the Loki instance ID or set the environment variable `CORTEX_TENANT_ID`. If Loki is running in single tenant mode, the required ID is `fake` (yes we know this might seem alarming but it's totally fine, no it can't be changed)
172+
171173
An example workflow is included below:
172174

173175
```sh

docs/sources/configuration/examples.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ storage_config:
179179

180180
This is a configuration to deploy Loki depending only on storage solution, e.g. an
181181
S3-compatible API like minio. The ring configuration is based on the gossip memberlist
182-
and the index is shipped to storage via [boltdb-shipper](../../operations/storage/boltdb-shipper/).
182+
and the index is shipped to storage via [Single Store (boltdb-shipper)](../../operations/storage/boltdb-shipper/).
183183

184184
```yaml
185185
auth_enabled: false

docs/sources/getting-started/_index.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ weight: 300
44
---
55
# Getting started with Loki
66

7+
1. [Getting Logs Into Loki](get-logs-into-loki/)
78
1. [Grafana](grafana/)
89
1. [LogCLI](logcli/)
910
1. [Labels](labels/)

docs/sources/getting-started/grafana.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,22 @@ title: Loki in Grafana
66
Grafana ships with built-in support for Loki for versions greater than
77
[6.0](https://grafana.com/grafana/download/6.0.0). Using
88
[6.3](https://grafana.com/grafana/download/6.3.0) or later is highly
9-
recommended to take advantage of new LogQL functionality.
9+
recommended to take advantage of new [LogQL]({{< relref "../logql/_index.md" >}}) functionality.
1010

1111
1. Log into your Grafana instance. If this is your first time running
1212
Grafana, the username and password are both defaulted to `admin`.
13-
2. In Grafana, go to `Configuration` > `Data Sources` via the cog icon on the
13+
1. In Grafana, go to `Configuration` > `Data Sources` via the cog icon on the
1414
left sidebar.
15-
3. Click the big <kbd>+ Add data source</kbd> button.
16-
4. Choose Loki from the list.
17-
5. The http URL field should be the address of your Loki server. For example,
15+
1. Click the big <kbd>+ Add data source</kbd> button.
16+
1. Choose Loki from the list.
17+
1. The http URL field should be the address of your Loki server. For example,
1818
when running locally or with Docker using port mapping, the address is
1919
likely `http://localhost:3100`. When running with docker-compose or
2020
Kubernetes, the address is likely `http://loki:3100`.
21-
6. To see the logs, click <kbd>Explore</kbd> on the sidebar, select the Loki
21+
1. To see the logs, click <kbd>Explore</kbd> on the sidebar, select the Loki
2222
datasource in the top-left dropdown, and then choose a log stream using the
2323
<kbd>Log labels</kbd> button.
24+
1. Learn more about querying by reading about Loki's query language [LogQL]({{< relref "../logql/_index.md" >}}).
2425

2526
Read more about Grafana's Explore feature in the
2627
[Grafana documentation](http://docs.grafana.org/features/explore) and on how to

docs/sources/getting-started/logcli.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: LogCLI
33
---
44
# Querying Loki with LogCLI
55

6-
If you prefer a command line interface, LogCLI also allows users to run LogQL
6+
If you prefer a command line interface, LogCLI also allows users to run [LogQL]({{< relref "../logql/_index.md" >}})
77
queries against a Loki server.
88

99
## Installation

docs/sources/operations/storage/_index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: Storage
33
---
44
# Loki Storage
55

6+
[High level storage overview here]({{< relref "../../storage/_index.md" >}})
7+
68
Loki needs to store two different types of data: **chunks** and **indexes**.
79

810
Loki receives logs in separate streams, where each stream is uniquely identified
@@ -25,11 +27,11 @@ For more information:
2527

2628
The following are supported for the index:
2729

30+
- [Single Store (boltdb-shipper) - Recommended for 2.0 and newer](boltdb-shipper/) index store which stores boltdb index files in the object store
2831
- [Amazon DynamoDB](https://aws.amazon.com/dynamodb)
2932
- [Google Bigtable](https://cloud.google.com/bigtable)
3033
- [Apache Cassandra](https://cassandra.apache.org)
3134
- [BoltDB](https://github.com/boltdb/bolt) (doesn't work when clustering Loki)
32-
- [BoltDB Shipper](boltdb-shipper/) EXPERIMENTAL index store which stores boltdb index files in the object store
3335

3436
The following are supported for the chunks:
3537

docs/sources/operations/storage/boltdb-shipper.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2-
title: BoltDB Shipper
2+
title: Single Store (boltdb-shipper)
33
---
4-
# Loki with BoltDB Shipper
5-
6-
:warning: BoltDB Shipper is still an experimental feature. It is not recommended to be used in production environments.
4+
# Single Store Loki (boltdb-shipper index type)
75

86
BoltDB Shipper lets you run Loki without any dependency on NoSQL stores for storing index.
97
It locally stores the index in BoltDB files instead and keeps shipping those files to a shared object store i.e the same object store which is being used for storing chunks.

docs/sources/operations/storage/filesystem.md

-100
Original file line numberDiff line numberDiff line change
@@ -42,103 +42,3 @@ The durability of the objects is at the mercy of the filesystem itself where oth
4242
### High Availability
4343

4444
Running Loki clustered is not possible with the filesystem store unless the filesystem is shared in some fashion (NFS for example). However using shared filesystems is likely going to be a bad experience with Loki just as it is for almost every other application.
45-
46-
## New AND VERY EXPERIMENTAL in 1.5.0: Horizontal scaling of the filesystem store
47-
48-
**WARNING** as the title suggests, this is very new and potentially buggy, and it is also very likely configs around this feature will change over time.
49-
50-
With that warning out of the way, the addition of the [boltdb-shipper](../boltdb-shipper/) index store has added capabilities making it possible to overcome many of the limitations listed above using the filesystem store, specifically running Loki with the filesystem store on separate machines but still operate as a cluster supporting replication, and write distribution via the hash ring.
51-
52-
As mentioned in the title, this is very alpha at this point but we would love for people to try this and help us flush out bugs.
53-
54-
Here is an example config to run with Loki:
55-
56-
Use this config on multiple computers (or containers), do not run it on the same computer as Loki uses the hostname as the ID in the ring.
57-
58-
Do not use a shared fileystem such as NFS for this, each machine should have its own filesystem
59-
60-
```yaml
61-
auth_enabled: false # single tenant mode
62-
63-
server:
64-
http_listen_port: 3100
65-
66-
ingester:
67-
max_transfer_retries: 0 # Disable blocks transfers on ingesters shutdown or rollout.
68-
chunk_idle_period: 2h # Let chunks sit idle for at least 2h before flushing, this helps to reduce total chunks in store
69-
max_chunk_age: 2h # Let chunks get at least 2h old before flushing due to age, this helps to reduce total chunks in store
70-
chunk_target_size: 1048576 # Target chunks of 1MB, this helps to reduce total chunks in store
71-
chunk_retain_period: 30s
72-
73-
query_store_max_look_back_period: -1 # This will allow the ingesters to query the store for all data
74-
lifecycler:
75-
heartbeat_period: 5s
76-
interface_names:
77-
- eth0
78-
join_after: 30s
79-
num_tokens: 512
80-
ring:
81-
heartbeat_timeout: 1m
82-
kvstore:
83-
consul:
84-
consistent_reads: true
85-
host: localhost:8500
86-
http_client_timeout: 20s
87-
store: consul
88-
replication_factor: 1 # This can be increased and probably should if you are running multiple machines!
89-
90-
schema_config:
91-
configs:
92-
- from: 2018-04-15
93-
store: boltdb-shipper
94-
object_store: filesystem
95-
schema: v11
96-
index:
97-
prefix: index_
98-
period: 168h
99-
100-
storage_config:
101-
boltdb_shipper:
102-
shared_store: filesystem
103-
active_index_directory: /tmp/loki/index
104-
cache_location: /tmp/loki/boltdb-cache
105-
filesystem:
106-
directory: /tmp/loki/chunks
107-
108-
limits_config:
109-
enforce_metric_name: false
110-
reject_old_samples: true
111-
reject_old_samples_max_age: 168h
112-
113-
chunk_store_config:
114-
max_look_back_period: 0s # No limit how far we can look back in the store
115-
116-
table_manager:
117-
retention_deletes_enabled: false
118-
retention_period: 0s # No deletions, infinite retention
119-
```
120-
121-
It does require Consul to be running for the ring (any of the ring stores will work: consul, etcd, memberlist, Consul is used in this example)
122-
123-
It is also required that Consul be available from each machine, this example only specifies `host: localhost:8500` you would likely need to change this to the correct hostname/ip and port of your consul server.
124-
125-
**The config needs to be the same on every Loki instance!**
126-
127-
The important piece of this config is `query_store_max_look_back_period: -1` this tells Loki to allow the ingesters to look in the store for all the data.
128-
129-
Traffic can be sent to any of the Loki servers, it can be round-robin load balanced if desired.
130-
131-
Each Loki instance will use Consul to properly route both read and write data to the correct Loki instance.
132-
133-
Scaling up is as easy as adding more loki instances and letting them talk to the same ring.
134-
135-
Scaling down is harder but possible. You would need to shutdown a Loki server then take everything in:
136-
137-
```yaml
138-
filesystem:
139-
directory: /tmp/loki/chunks
140-
```
141-
142-
And copy it to the same directory on another Loki server, there is currently no way to split the chunks between servers you must move them all. We expect to provide more options here in the future.
143-
144-

0 commit comments

Comments
 (0)