Hello everyone,
I am trying to extract some data from the logs.
I have created a little search that works well:
customergetservice host=MBKBKKSPHTRSP0* source="/var/log/jbossas/standalone/server.log" | transaction RequestId
It links the request and the response from the server by the extracted field RequestId.
However, I am trying to filter only some parameter contained in the field Login:
The login has many possibilities of different values, but it starts with either:
The login is only in the request, and not in the response.
I am trying to filter by putting the following
customergetservice host=MBKBKKSPHTRSP0* source="/var/log/jbossas/standalone/server.log" | transaction RequestId startswith="BCIMR-*"
However, when I add the StartsWith, everything's broken, as the events are not linked together anymore.
See following comment for example as I can't add more than 2 images per question
customergetservice host=MBKBKKSPHTRSP0* source="/var/log/jbossas/standalone/server.log" (login="BBC-*" OR login="BBF-*" OR login="BFL-*" OR login="BCIMR-*") OR "LEAN-RESPONSE"
| rex "(?<status>LEAN-(REQUEST|RESPONSE))"
| stats dc(status) as flag values(_raw) as _raw values(_time) as _time by RequestId
| where flag > 1
you don't need transaction
transaction
command consumes much search time.
stats
is almost useful and no problem.
because stats
makes events to combine one event by same field value.
Isn't it the same as the transaction
command?
my previous answer has a few typo(statsu). I fix it.
Is there the login
field? please try again.