Log aggregation issues because of new lines #2568
Labels
A: good-first-issue
Admin: good for newcomers
I: CLI
Internal: related to the relayer's CLI
O: new-feature
Objective: cause to add a new feature or support
O: usability
Objective: cause to improve the user experience (UX) and ease using the product
Milestone
Summary
Loki reports errors for incorrectly formatted logs. A quick fix would be to remove every "\n" from the logs.
We should also leverage log labelling. Example of a labeled log :
Description
Hermes' logs can be shipped to Loki by two different ways but, both methods will throw errors :
hermes.log
and ship the log's content to Loki.Standard logs can not be parsed by Loki's default config because of escaped newlines and/or tab sequences in log lines. Loki will throw an error
Your logs might have incorrectly escaped content
. It can not know which line belongs to which log.Using a JSON output fixes some issues. Loki can link a line and its log. However, it still reports error because of escaped characters and some content is not correctly parsed.
tracing-loki
. Do not try this crate with the example in the docs, instead use this example.The field
message
was not correctly formatted. Also, usingtracing-loki
is most likely not the right approach because it would bind users to Loki while other log aggregators exist.How to use Loki ?
Install through Docker
https://grafana.com/docs/loki/latest/installation/docker/
Grafana
Open
http://localhost:3000
Login :
admin
, password :admin
Select
Add your first Data Source
Select
Loki
Enter URL :
http://loki:3100
.Press Save & Test.
Explore
Click on
Explore
on the left of the screen.(Note : do not use
localhost:3100
)The content of every log file in '/var/log' is shipped to Loki by
Promtail
.To the right of "Run query", select 5s to automatically run a query every 5s.
Send a logfile to Loki
To listen to
osmosis-1
, use the config file in #2533 .Query your logs
Come back to Grafana and select
filename = var/log/hermes.log
.For Admin Use
The text was updated successfully, but these errors were encountered: