I am having below logs, want to create chart for number of activities done on weekday
log1:
index="abc_xyz" |activity="/google.com*bookstore" |eventEndTime=2018-09-27
log2:
index="abc_xyz" |activity="/yahoo.com*groceryStore" |eventEndTime=2018-09-26
log3:
index="abc_xyz" |activity="/bing.com*wineStore" |eventEndTime=2018-09-22
I am came up with below query, but i need a regex to get value after the 1st occured "*" (ex: bookstore, groceryStore, wineStore) in activity2 and want to get count of that activity2 based chart
index="abc_xyz" activity="/google.com*bookstore" earliest=-14d latest=-0d | chart count(activity) over date_hour by date_wday
To extract activity2, try this
... | rex field=activity "\*(?<activity2>\w+)" | ...