Sorry for the late show, but this returns null in the second field
I am getting the null response as well.
Is one of your fields that you're merging contains null values?
Apparently they did, but I could not find where they were. I also had to manipulate this solution some to get what I wanted. I had to fields that had IPs in them so I did this.
myprecious | fillnull value="" source_address ip_address| eval output =ip_address.source_address
Here is one way- but there is probably something better
yoursearchhere |
rename field1 as output |
append [search yoursearchhere earliest=-24h |
rename field2 as output ]
This runs the search twice...
Notice that I included earliest=-24h for the inner search. Otherwise, this will search over all time - it is not affected by the time selector. [No longer true - the inner search runs over the range specified by the timerange selector.]
The subsearch naturally carries the time of the outer search unless otherwise specified, as I understand it.
Agreed @landen99, but that was not true in 2012 🙂
Well give more details. You didn't state that this was going to be used across millions events. Also you need to give more details on the search you're using to generate these fields. Do field1 and field2 belong to the same search result? Do both fields always occur in all events you want to apply this to?
This approach is expensive and might not work when dealing with millions of events.
Thanks.