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

winston-loki not working properly with Grafana v7.1.3 #49

Open
dimascrocco opened this issue Oct 27, 2020 · 4 comments
Open

winston-loki not working properly with Grafana v7.1.3 #49

dimascrocco opened this issue Oct 27, 2020 · 4 comments

Comments

@dimascrocco
Copy link

Hello, I have a working application using winston-loki, but after updating the grafana server to a new version (7.1.3) I found out that most part of the log messages are not being logged in the grafana server.

I've tried the winston-loki v5.1.2 (some messages are logged in grafana) and winston-loki v6.0.0-rc.4 (no messages are logged in grafana).

Any help? When u said that the latest winston-loki should work within the latest grafana server, which version of grafana are u talking about?

Thanks in advance!

@JaniAnttonen
Copy link
Owner

JaniAnttonen commented Oct 27, 2020

Thanks for pointing this out! You're right, there's definitely something wrong when using the current version, as the examples don't seem to work either. Happy to help, but not sure if I have the time to dig deep into 1.5.0 – 2.0.0 compatibility before the weekend.

I released the examples in April, and on that note the latest working version should be around 1.4.0. Sorry for using such vague language in defining what versions have been deemed working with the latest build. I recommend everyone using the latest, version ^6.0.0 of this package, since it has the changes needed to work with Grafana Loki version 1.0.0, and because the winston-loki 5.1.2 uses soon-to-be deprecated API endpoints.

Have to take a look into their latest change logs, but I recommend tinkering a bit with the examples and the docker-compose.yaml, as that's what I would do in a situation like this.

What's your configuration exactly and what do you mean by Grafana Server? Do you mean the dashboard GUI itself without the promtail and loki components, or is this a bundle of some sort?

@JaniAnttonen
Copy link
Owner

It seems that Grafana Server 7.0.0 has removed support for deprecated endpoints: "Datasource/Loki: Support for deprecated Loki endpoints has been removed."

https://github.com/grafana/grafana/blob/master/CHANGELOG.md#breaking-changes-2

@dimascrocco
Copy link
Author

Really sorry for the very very very late response!

For grafana server, I used the available .deb package from grafana download section (version 7.1.3):
https://grafana.com/grafana/download

For both promtail and loki binaries I got them from here (version 1.6.0):
https://github.com/grafana/loki/releases/

So right now, I'm going to downgrade the loki/promtail versions to 1.4.1 to see what happens.
Thanx in advance for your attention.
Happy new year =)

@stouch
Copy link

stouch commented Aug 28, 2023

https://grafana.com/docs/loki/latest/api/#push-log-entries-to-loki

$ curl -v -H "Content-Type: application/json" -XPOST -s "http://localhost:3100/loki/api/v1/push" --data-raw \
  '{"streams": [{ "stream": { "foo": "bar2" }, "values": [ [ "1570818238000000000", "fizzbuzz" ] ] }]}'

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

No branches or pull requests

3 participants