You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
timestamp hostname [pid][file.py][xid][rpc][INFO]:info msg
... lots of INFO ...
timestamp hostname [pid][file.py][xid][rpc][ERROR]:error msg
timestamp hostname [pid][WARNING]:[TRACE][0]Traceback (most recent call last):
timestamp hostname [pid][WARNING]:[TRACE][1]trace msg
timestamp hostname [pid][WARNING]:[TRACE][2]trace msg
... lots of TRACE ...
timestamp hostname [pid][WARNING]:[TRACE][n]Traceback end
timestamp hostname [pid][file.py][xid][rpc][INFO]:info msg
... lots of INFO ...
Our requirement is to merge multiple lines of logs with special format into one event and send it to Loki. In this example, we want to drop other logs, and merge the logs from ERROR to Traceback end, and send it to Loki, how should I write the config file?
Btw, we may also have some single line ERROR logs without TRACE, and those need to be dropped too.
I've tried the 2 configurations, but they do not work:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Log example:
Our requirement is to merge multiple lines of logs with special format into one event and send it to Loki. In this example, we want to drop other logs, and merge the logs from
ERROR
toTraceback end
, and send it to Loki, how should I write the config file?Btw, we may also have some single line
ERROR
logs withoutTRACE
, and those need to be dropped too.I've tried the 2 configurations, but they do not work:
Before the vector, we are using td-agent, the config is like this:
Beta Was this translation helpful? Give feedback.
All reactions