I'm trying to extract a field with the result of an API from a log, either containing "success" or "success.notfound".
This same API call is logged multiple times within a single event, so I'm trying to use rex to only look at the result listed immediately after a particular line item corresponding to the result I am interested in (I want the result after the "onePartKey=true" string, not the one after the "shippingstatus.within_call_digital_events_api_throttle.yes" string)
Using rex across multiple lines, with each line having a timestamp, makes it a little harder, I think, but I came up with a query I think should work.
It runs and gives me some partial data, but I get messages saying:
"Errors occurred while the search was executing. Therefore, search results might be incomplete." and "Streamed search execute failed because: Error in 'rex' command: regex="product\.rtm\.success, \/customers\/{custRefId}\/profiles\?onePartKey.true[\s\S]*product\.aws\.attempt, DigitalEventsAPI[\s\S]*product\.aws\.(?P(.*?)), \/private\/ASVEVENTHUB" has exceeded configured match_limit, consider raising the value in limits.conf."
Any ideas on how to fix this to get it to run without errors?
Here's my rex:
rex "product\.rtm\.success, \/customers\/{custRefId}\/profiles\?onePartKey.true[\s\S]*product\.aws\.attempt, DigitalEventsAPI[\s\S]*product\.aws\.(?P<Result>(.*?)), \/private\/ASVEVENTHUB"
The log looks like this:
* WANT THIS ONE *
189, 2019-03-31 20:58:35.670 PDT, product.rtm.success, /customers/{custRefId}/profiles?onePartKey=true
190, 2019-03-31 20:58:35.670 PDT, product.aws.attempt, DigitalEventsAPI
191, 2019-03-31 20:58:35.818 PDT, product.aws.success, /private/ASVEVENTHUB/servicing-events/{profileId}/?index=webUserId
...
* DON'T WANT THIS ONE *
244, 2019-03-31 20:58:37.820 PDT, product.shippingstatus.within_call_digital_events_api_throttle.yes,
245, 2019-03-31 20:58:37.971 PDT, product.aws.attempt, DigitalEventsAPI
246, 2019-03-31 20:58:38.119 PDT, product.aws.success.notfound, /private/ASVEVENTHUB/servicing-events/{profileId}/?index=webUserId
... View more