Filtering logs with the right written order

Hello,

What im trying to do is filer out numbers between two " , " as you can see in the picture, problem is, those numbers are not in correct time order as how logs are written.
When 38 is filtred out, for some reason it jumps in time.
Doesw anyone have an idea how to fix this?

Thank you for your answers.

With best regards,
Oto Weinlich

Hey @weinlicho - you are performing two separate queries on the same data and I think the data is being combined in your panel from the two queries which is why they appear out of order.

You should combine these two queries together in a pipeline:
{filename="..."} != ",38," != ",205,"

Also note the use of != instead of |=.
!= will filter out, while |= will include.

Thank you for responding.

Didnt you mean to combine it this way?
{filename=“C:\var\log\1005\02-01-21_data.txt”}|= “,38,” |= “,205,”
¨
But in this case it shows just this:
error

Perhaps you can clarify what you mean by:

What im trying to do is filer out numbers between two " , " …

To me, “filter out” means to exclude. Are you trying to exclude these values or include only those two?

My bad, sorry, I used wrong words, I mean inculde those two.

Ah!

OK, you can use a regex matcher:

Something like:
{filename="..."} |~ ",(38|205),"

1 Like

Yup, this works, thank you very much!

1 Like