How can I extract a sub-field from a field and print it as a separate field in filebeat?

what is your expected output for the IP if converting to "long"? For example, if the IP is 192.168.1.1, what do you expect the final output to be?

If you're not moving this data into elasticsearch, then you may want to check out the script processor and write some custom javascript to do those conversions.