Could someone have a look at the following query and see why it does not give me the results I expect based on the documentation of map?
index=portal sourcetype=app:*** source="log" cls=c.b.m.s.SoapServiceClientService Exit event 'ERROR'
| rex "(?i) .*? \[(?P<ResponseCode>\d+)(?=\])"
| search ResponseCode=504
| stats values(ses) as Session
| map search="search index=portal sourcetype=app:*** source='log' cls='c.b.m.s.SoapClient Webservicecall*' ses=$Session$ | stats first"
So the first search lists all the session ID's for which a certain error occurs. I want to match this to another event from those sessions which contains the name of the webservice for which the call failed. The second search finds multiple events in the same session, but with 'stats first' I take the latest, which for now is assumed to be the failing one. Instead of the events from the second search, I only get events for the first search as results. No table. So right now my result are events which I would also get when removing the whole map bit and the first stats. Nothing seems to have been added in regards to fields. The holy grail would allow me to include two more rex commands in the map search to extract two fields. When I add a rex command comparable to the one in the first search, the second search won't run.
... View more