Replies: 2 comments 1 reply
-
And it's worth noting that if you send some sample rows I can help you debug further |
Beta Was this translation helpful? Give feedback.
-
ah actually, the best option is to just parse the rest of the message: I was surprised to find that there isn't an easy way to recover the raw message currently. |
Beta Was this translation helpful? Give feedback.
-
I had a log file with rows that contained various information. The only common info to all of them was the date and the time of the row. My goal was to extract rows between two timestamps.
After reading docs and looking at the tests, this was was my approach:
cat log.txt | agrind '* | parse "[* *: " as date, time [nodrop] | where date=="2021-09-09" | where parseDate(time) >= parseDate("17:00:00") | where parseDate(time) <= parseDate("17:35:00")'
The line will error out with the following message:
Error: Failed to parse query
It began erroring when I added
[nodrop]
trying to get the whole row not justdate
andtime
.Couldn't figure out why this was happening and I had to give up on the tool.
The tool has potential but it still has some quirks and I feel it's geared towards field extraction not necessarily row filtering. It was also unclear that boolean operators wouldn't work with
where
.EDIT: Adding a row sample
[2021-09-09 06:06:21,967: DEBUG/MainProcess] Rest of the log can vary wildly but you can expect it's one line
.Beta Was this translation helpful? Give feedback.
All reactions