diff options
Diffstat (limited to 'docs/queries/loki.rst')
| -rw-r--r-- | docs/queries/loki.rst | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/queries/loki.rst b/docs/queries/loki.rst new file mode 100644 index 0000000..2ee57a3 --- /dev/null +++ b/docs/queries/loki.rst @@ -0,0 +1,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]) |