The underlying search here is a little complex. Essentially, the search looks to calculate how many sales of each item we expect to sell in the next 24 hours, based on the sales of each item since midnight on the day of the search. Once we have this data, we can check the inventory and calculate if we might run out of any items. The alert then triggers if the expected inventory is anticipated to be 0 or below. The search runs every hour. You should assume that the inventory lookup is refreshed each day at midnight.
Let's break the search down piece by piece:
Search fragment |
Description |
index=main sourcetype=log4j earliest=-0d@d requestType=removeItem OR requestType=updateCart OR requestType=addItem |
First, ... |