Replies: 4 comments 6 replies
-
Yes you could parse out
Only labels added via
The |
Beta Was this translation helpful? Give feedback.
-
wondering if this may be causing my most recent issues...
|
Beta Was this translation helpful? Give feedback.
-
think i finally got this to work they way i wanted. thanks alot for the help @jszwedko
Still not sure why the error handler causes that output above though. im guessing maybe if you are returning an error, it maybe exiting early so you can do the handling. which would mean that multiple parsers in such a case isn't a good idea, since you likely are going to have the more specific patterns at the top - the ones that are more likely to cause a miss/error. |
Beta Was this translation helpful? Give feedback.
-
So i did some more testing with this today and it really is puzzling -
My log file patterns has changed over the past few months. With all three grok patterns in the toml file, i see data only from about 2 months ago and older. I have no clue what's going on here because the grok statements do parse the various log lines fine when testing standalone. I am seeing these errors on startup of vector...feels like for earlier logs, an exception is happening on the first grok pattern and it is causing maybe the entire log/file to not be processed. Either that or maybe these brackets are causing issues. i dont know
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
i've converted my toml to use the parse_grok function. i have two questions:
the 'msg' field i parse out may contain other patterns i want to parse out, such as 'app_id=app_1234'. Can i post parse msg and add these fields afterwards, rather than have to keep adding patterns for each? It seems it would be cleaner to post parses for optional fields that may or may not be present in the parsed 'msg' field?
This all now parses and ends up in loki/grafana as json, but the fields do not end up as labels i can use in queries. i still am limited to 'app' and 'env' only (labels added by the 'sink.to_indexer' section in my toml. So im still forced to do a text search to find certain things i'm looking for.
toml
example logs with/and without app_id:
Beta Was this translation helpful? Give feedback.
All reactions