Hi @gcusello I am working on this exact query. The problem is that I do not get any results even though I have devices reporting only uninstall event code, which is 11724. The appname is being extracted correctly using the following rex: | rex field=Message "Product: (?<appname>[^\-]+)" Could you please help me fix the query? index=wineventlog EventCode IN ("11724","11707") Message="*sampleapp*"
| rex field=Message "Product: (?<appname>[^\-]+)"
| stats
latest(eval(if(EventCode="11724",_time,""))) AS uninstall
latest(eval(if(EventCode="11707",_time,""))) AS install
dc(EventCode) AS EventCode_count
BY host appname
| eval diff=install-uninstall
| where (EventCode_count=1 AND EventCode="11724") OR (EventCode_count=2 AND diff<300)
... View more