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
docker run -v $(pwd):/mnt/config -v /var/log:/var/log grafana/promtail:2.3.0 -config.file=/mnt/config/promtail-config.yaml
25
25
```
26
26
27
27
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.
@@ -36,10 +36,10 @@ Copy and paste the commands below into your terminal. Note that you will need to
docker run -v <local-path>:/mnt/config -v /var/log:/var/log grafana/promtail:2.3.0 --config.file=/mnt/config/promtail-config.yaml
43
43
```
44
44
45
45
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.
@@ -51,6 +51,6 @@ Navigate to http://localhost:3100/metrics to view the output.
51
51
Run the following commands in your command line. They work for Windows or Linux systems.
Copy file name to clipboardexpand all lines: docs/sources/release-notes/v2-3.md
+75-10
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,86 @@ title: V2.3
4
4
5
5
# Version 2.3 release notes
6
6
7
-
Prose here about 2.3.
7
+
The Loki team is excited to announce the release of Loki 2.3!
8
+
9
+
It's been nearly 6 months since 2.2 was released and we have made good use of that time to bring forward several significant improvements and requested features.
10
+
11
+
2.3 is also the first version of Loki released under the AGPLv3 license. You can [read more about our licensing here](https://grafana.com/licensing/).
12
+
13
+
Some parts of the Loki repo will remain Apache-2.0 licensed (mainly clients and some tooling), for more details please read [LICENSING.md](https://github.com/grafana/loki/blob/main/LICENSING.md).
8
14
9
15
## Features and enhancements
10
16
11
-
List of features here.
17
+
* Loki now has the ability to apply [custom retention](../../operations/storage/retention/) based on stream selectors! This will allow much finer control over log retention all of which is now handled by Loki, no longer requiring the use of object store configs for retention.
18
+
* Coming along hand in hand with storing logs for longer durations is the ability to [delete log streams](../../operations/storage/logs-deletion/). The initial implementation lets you submit delete request jobs which will be processed after 24 hours.
19
+
* A very exciting new LogQL parser has been introduced: the [pattern parser](../../logql/#parser-expression). Much simpler and faster than regexp for log lines that have a little bit of structure to them such as the [Common Log Format](https://en.wikipedia.org/wiki/Common_Log_Format). This is now Loki's fastest parser so try it out on any of your log lines!
20
+
* Extending on the work of Alerting Rules, Loki now accepts [recording rules](../../rules/#recording-rules). This lets you turn your logs into metrics and push them to Prometheus or any Prometheus compatible remote_write endpoint.
21
+
* LogQL can understand [IP addresses](../../logql/ip/)! This enables filtering on IP addresses and subnet ranges.
22
+
23
+
For those of you running Loki as microservices, the following features will improve performance operations significantly for many operations.
24
+
25
+
* We created an [index gateway](../../operations/storage/boltdb-shipper/#index-gateway) which takes on the task of downloading the boltdb-shipper index files allowing you to run your queriers without any local disk requirements, this is really helpful in Kubernetes environments where you can return your queriers from Statefulsets back to Deployments and save a lot of PVC costs and operational headaches.
26
+
* Ingester queriers [are now shardable](https://github.com/grafana/loki/pull/3852), this is a significant performance boost for high volume log streams when querying recent data.
27
+
* Instant queries can now be [split and sharded](https://github.com/grafana/loki/pull/3984) making them just as fast as range queries.
28
+
29
+
A very common feature requested has also been included in 2.3:
Without revisiting the decisions and discussions around the somewhat controversial behavior of _unhealthy_ ingesters, you can now decided how you would like them to be handled: manually or automatically.
34
+
35
+
Lastly several useful additions to the LogQL query language have been included:
36
+
37
+
* More text/template functions are included for `label_format` and `line_format` with PR [3515](https://github.com/grafana/loki/pull/3515), please check out the [documentation for template functions](https://grafana.com/docs/loki/latest/logql/template_functions/).
38
+
* Also support for math functions withing `label_format` and `line_format` was included with [3434](https://github.com/grafana/loki/pull/3434).
39
+
* Two additional metric functions with some interesting use cases `first_over_time` and `last_over_time` were added in PR [3050](https://github.com/grafana/loki/pull/3050). These can be useful for some down sampling approaches where instead of taking an average, max, or min of samples over a range in a metrics query, you can select the first or last log line to use from that range.
40
+
41
+
## Upgrade considerations
42
+
43
+
The path from 2.2.1 to 2.3.0 should be smooth, as always, please check out the [Upgrade Guide](https://github.com/grafana/loki/blob/master/docs/sources/upgrading/_index.md#230) for important upgrade guidance.
44
+
45
+
One change we consider noteworthy however is:
46
+
47
+
*[3216](https://github.com/grafana/loki/pull/3216)**sandeepsukhani**: check for stream selectors to have at least one equality matcher.
48
+
49
+
This change now rejects any query which does not contain at least one equality matcher, an example may better illustrate:
50
+
51
+
`{namespace=~".*"}`
52
+
53
+
This query will now be rejected, however there are several ways to modify it for it to succeed:
54
+
55
+
Add at least one equals label matcher:
56
+
57
+
`{cluster="us-east-1",namespace=~".*"}`
58
+
59
+
Use `.+` instead of `.*`
60
+
61
+
`{namespace=~".+"}`
62
+
63
+
This difference may seem subtle but if we break it down `.` matches any character, `*` matches zero or more of the preceding character and `+` matches one or more of the preceding character. The `.*` case will match empty values where `.+` will not, this is the important difference. `{namespace=""}` is an invalid request (unless you add another equals label matcher like the example above).
64
+
65
+
The reasoning for this change has to do with how index lookups work in Loki, if you don't have at least one equality matcher Loki has to perform a complete index table scan which is an expensive and slow operation.
66
+
67
+
68
+
69
+
## Security fixes
70
+
71
+
List of security fixes for 2.3.x.
72
+
73
+
### 2.3.0 security fixes
74
+
75
+
2.3.0 contains an important security fix:
76
+
77
+
*[4020](https://github.com/grafana/loki/pull/4020)**simonswine**: Restrict path segments in TenantIDs (CVE-2021-36156 CVE-2021-36157).
78
+
79
+
**Note** Exploitation of this vulnerability requires the ability for an attacker to craft and send directly to Loki an `X-Scope-OrgID` header, end users should not have the ability to create and send this header directly to Loki as it controls access to tenants and is important to control setting of this header for proper tenant isolation and security. We always recommend having a proxy or gateway be responsible for setting the `X-Scope-OrgID`.
12
80
13
-
- Pattern parser. [poor docs link to Parser expression](../../logql/#parser-expression)
14
-
- Windows event log scraping. [docs link](../../clients/promtail/scraping/#windows-event-log)
15
-
- Recording rules.
16
-
- Index Gateway.
17
-
- Retention.
18
-
-`promtail_instance` label.
19
81
20
82
## Bug fixes
21
83
22
-
Lists of bug fixes for v2.3.x.
84
+
Lists of bug fixes for 2.3.x.
85
+
86
+
### 2.3.0 bug fixes
23
87
24
-
### V2.3.0 bug fixes
88
+
* An important fix for leaking resources was patched with [3733](https://github.com/grafana/loki/pull/3733), when queries were canceled a goroutine was left running which would hold memory resources creating a memory leak.
89
+
*[3686](https://github.com/grafana/loki/pull/3686) fixes a panic with the frontend when use with downstream URL. **Note** we recommend using the [GRPC Pull Model](https://grafana.com/docs/loki/latest/configuration/query-frontend/#grpc-mode-pull-model), better performance and fair scheduling between tenants can be obtained with the GPRC Pull Model.
Copy file name to clipboardexpand all lines: docs/sources/upgrading/_index.md
+27
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,33 @@ If possible try to stay current and do sequential updates. If you want to skip v
19
19
20
20
-_add changes here which are unreleased_
21
21
22
+
## 2.3.0
23
+
24
+
### Loki
25
+
26
+
#### Query restriction introduced for queries which do not have at least one equality matcher
27
+
28
+
PR [3216](https://github.com/grafana/loki/pull/3216)**sandeepsukhani**: check for stream selectors to have at least one equality matcher
29
+
30
+
This change now rejects any query which does not contain at least one equality matcher, an example may better illustrate:
31
+
32
+
`{namespace=~".*"}`
33
+
34
+
This query will now be rejected, however there are several ways to modify it for it to succeed:
35
+
36
+
Add at least one equals label matcher:
37
+
38
+
`{cluster="us-east-1",namespace=~".*"}`
39
+
40
+
Use `.+` instead of `.*`
41
+
42
+
`{namespace=~".+"}`
43
+
44
+
This difference may seem subtle but if we break it down `.` matches any character, `*` matches zero or more of the preceding character and `+` matches one or more of the preceding character. The `.*` case will match empty values where `.+` will not, this is the important difference. `{namespace=""}` is an invalid request (unless you add another equals label matcher like the example above)
45
+
46
+
The reasoning for this change has to do with how index lookups work in Loki, if you don't have at least one equality matcher Loki has to perform a complete index table scan which is an expensive and slow operation.
0 commit comments