IP Field in IIS log is like below.
100.30.24.56,+11.44.66.778,+120.33.44.15,12.567.89.666
I want to get only the IP before first comma. (100.30.24.56 in this case).
Tried something like below but no luck.
eval IP=split(IP,",")
You were halfway there. The split function returns a multi-value field. The next step is to extract the first entry in that multi-value field.
| eval IP=split(IP,",")
| eval IP=mvindex(IP, 0)
@richgalloway That worked!. Thank you. Upvoted.
You were halfway there. The split function returns a multi-value field. The next step is to extract the first entry in that multi-value field.
| eval IP=split(IP,",")
| eval IP=mvindex(IP, 0)