aboutsummaryrefslogtreecommitdiffstats
path: root/docs/queries/loki.rst
blob: 2ee57a3edf607eb01114096caf0e250a1777c6b4 (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
Loki queries
============

Find any logs containing “ERROR”
--------------------------------

.. code:: shell

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

Find all logs from bot service
------------------------------

.. code:: shell

   {job="default/bot"}

The format is ``namespace/object``

Rate of logs from a service
---------------------------

.. code:: shell

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