Nice! I learned some new tricks from your search string, thanks.
I like your answer better than mine in several ways; for one, it's more concise.
On my system, with the "test" event I described in my answer, the following search:
sourcetype="steverimar" | eval temp=Name."#".Month."#".Year | fields - Name Month Year | untable temp data Value | rex field=temp "(?<Name>.*)#(?<Month>.*)#(?<Year>.*)" | table Name Month Year Value
produces the following results (as displayed on the Statistics tab):
Name Month Year Value
Steve 2 2015 1
Steve 2 2015 2
Steve 2 2015 3
Steve 2 2015 4
Steve 2 2015 5
Steve 2 2015 localhost:8088
Steve 2 2015 test
Steve 2 2015 1
Steve 2 2015 {"":_"",_"":_,_"":_,_"":_,_"":_,_"":_,_"":_,_"":_}
Steve 2 2015 http:GXH
Steve 2 2015 steverimar
Steve 2 2015 MYPC
(I wish this forum supported table formatting. Does it? I've tried GitHub-flavored Markdown table formatting: nope. And HTML table, tr, and td tags get "sanitized" away.)
Some nits:
The results include not just the desired Data1 , Data2 ... values, but also the values of the following fields: host , index , linecount , punct , source , sourcetype , splunk_server . (Or is this my problem; Splunk behavior that I can change on my system?)
The Month column has the same value (2) in every row, whereas, according to the question, the value should increment by 1 after each row, starting from the value of the original Month field: 2, 3, 4, 5, 6.
... View more