-
Notifications
You must be signed in to change notification settings - Fork 53
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
Can not find any logs in Grafana Explorer #75
Comments
Maybe
|
An important thing, I set |
@Garfield550 did you manage to fix this? I have a similar problem. If I manually send the logs with curl, they show up in grafana, but when |
@chreniuc Not yet, waiting for solution. |
@Garfield550 I did an investigation and I managed to fix the problem on my side. I'm not sure if it's the same problem as yours. I've added logs as you did, I printed the request body that was sent and I also logged here the response. The request body that send to loki was this: {"streams":[{"stream":{"level":"info","job":"santier.io-backend"},"values":[["null","POST /item/getAll 200 23ms {\"meta\":{}}"]]}]} The response from loki was this: loghttp.PushRequest.Streams: []*loghttp.Stream: unmarshalerDecoder: Value looks like Number/Boolean/None, but can't find its end: ',' or '}' symbol, error found in #10 byte of ...|\":{}}"]]}]}|..., bigger context ...|ull","POST /item/getAll 200 23ms {\"meta\":{}}"]]}]}|... I've sent the request via curl and I've received the same response: curl -v -H "Content-Type: application/json" -XPOST -s "http://localhost:3100/loki/api/v1/push" --data-raw '{"streams":[{"stream":{"level":"info","job":"santier.io-backend"},"values":[["null","POST /item/getAll 200 23ms {\"meta\":{}}"]]}]}' The fix for me, was to set the After setting that to true, the logs showed up in grafana. @JaniAnttonen shouldn't this be specified in the readme? If that timestamp is set to null, the logs won't show up in grafana, and another thing is that on the loki side, no error is logged for this, I've used debug log for loki and it was only logging this: Or should the library throw an error or something when it receives that response? I was using |
The library should most definitely throw an error if any logs have a null value as a timestamp. Probably even move towards a configuration where there's |
i think we are discussing this issue in #90 as well |
@nort3x Yeah, seems to be a duplicate issue. Suggestion: Remove the |
I'm not experienced but i think the solution should be something that works out of the box and respectful to convention over configuration |
The problem for me was that I was supplying the host with a trailing slash E.g. |
The fix #115 |
I run Grafana Loki in my host machine using Docker, and I have a worker program also running in Docker.
I set up Winston Loki use follow configs:
In worker docker stdout, I can saw LokiTransport
options
,batcher
andpushLogEntry
has correct value (I add some console log into winston-loki package):But I can not find any log in Grafana Explorer, did I missed something?
The text was updated successfully, but these errors were encountered: