aboutsummaryrefslogtreecommitdiffstats
path: root/docs/_queries/loki.md
blob: 5dee3c3a510e6c70e5451519c8c699a3a689dc9c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
layout: default
title: Loki
---

# Loki queries

## Find any logs containing "ERROR"

```sql
{job=~"default/.+"} |= "ERROR"
```

## Find all logs from bot service

```sql
{job="default/bot"}
```

The format is `namespace/object`

## Rate of logs from a service

```sql
rate(({job="default/bot"} |= "error" != "timeout")[10s])
```