Skip to content

Commit

Permalink
Loki plugin (#2755)
Browse files Browse the repository at this point in the history
* plugin for loki logs

* typo

* COL-NAME -> NAME
  • Loading branch information
bdols authored Aug 16, 2024
1 parent cd04b6c commit 37a5f05
Showing 1 changed file with 95 additions and 0 deletions.
95 changes: 95 additions & 0 deletions plugins/log-loki.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
plugins:
# https://grafana.com/docs/loki/latest/query/logcli/
# you must set the LOKI_ADDR environment variable ("export LOKI_ADDR=https://loki.internal" in bash) before starting k9s to use logcli
loki-container:
shortCut: Shift-L
description: "loki fmt"
scopes:
- cantainers
command: logcli
background: false
args:
- query
- "{ namespace = \"$NAMESPACE\", pod = \"$POD\", container = \"$NAME\" }"
- -f
loki-container-raw:
shortCut: Ctrl-L
description: "loki raw"
scopes:
- containers
command: logcli
background: false
args:
- query
- "{ namespace = \"$NAMESPACE\", pod = \"$POD\", container = \"$NAME\" }"
- -f
- -oraw
loki-pods:
shortCut: Shift-L
description: "loki fmt"
scopes:
- po
command: logcli
background: false
args:
- query
- "{ namespace = \"$NAMESPACE\", pod = \"$NAME\" }"
- -f
loki-pods-raw:
shortCut: Ctrl-L
description: "loki raw"
scopes:
- po
command: logcli
background: false
args:
- query
- "{ namespace = \"$NAMESPACE\", pod = \"$NAME\" }"
- -f
- -oraw
loki-node:
shortCut: Shift-L
description: "loki fmt"
scopes:
- node
command: logcli
background: false
args:
- query
- "{ node_name = \"$NAME\" }"
- -f
loki-node-raw:
shortCut: Ctrl-L
description: "loki raw"
scopes:
- node
command: logcli
background: false
args:
- query
- "{ node_name = \"$NAME\" }"
- -f
- -oraw
loki-ns:
shortCut: Shift-L
description: "loki fmt"
scopes:
- namespace
command: logcli
background: false
args:
- query
- "{ namespace = \"$NAME\" }"
- -f
loki-ns-raw:
shortCut: Ctrl-L
description: "loki raw"
scopes:
- namespace
command: logcli
background: false
args:
- query
- "{ namespace = \"$NAME\" }"
- -f
- -oraw

0 comments on commit 37a5f05

Please sign in to comment.