Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loki plugin #2755

Merged
merged 3 commits into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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