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

631 loki output #661

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

romanchechyotkin
Copy link

Loki

Added loki output plugin

Fixes #631

@romanchechyotkin
Copy link
Author

romanchechyotkin commented Aug 1, 2024

Hello, thanks for feedback, yesterday i found out that there is loki-go client by Grafana, i tried to create my wheel as Loki HTTP client, may be rewrite using this library?
https://github.com/grafana/loki-client-go
I can see the the phrase DONT USE IT by authors, but this client is used by this library https://github.com/samber/slog-loki

What do you think, rewrite using library or make a little bit refactoring

@romanchechyotkin
Copy link
Author

but what do you thnk about current logs output
image
image

@DmitryRomanov
Copy link
Collaborator

Hello, thanks for feedback, yesterday i found out that there is loki-go client by Grafana, i tried to create my wheel as Loki HTTP client, may be rewrite using this library? https://github.com/grafana/loki-client-go I can see the the phrase DONT USE IT by authors, but this client is used by this library https://github.com/samber/slog-loki

What do you think, rewrite using library or make a little bit refactoring

I think it's better to not use libraries (to avoid using dependencies) and make some fixes.

@DmitryRomanov
Copy link
Collaborator

but what do you thnk about current logs output image image

looks good to me. try searching by labels and others logql examples

@romanchechyotkin
Copy link
Author

all logs
image

select where kind=normal22
image

@DmitryRomanov
Copy link
Collaborator

Firefox_Screenshot_2024-08-16T07-42-05 592Z

Here is example of logs from Promtail to Loki. We have fields app, container, node_name, pod and you can search by them. And our k8s input plugin adds those labels as well.

@DmitryRomanov DmitryRomanov self-requested a review March 7, 2025 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: add output to loki
2 participants