Skip to content

Instantly share code, notes, and snippets.

@chuckg
Created August 28, 2017 22:33
Show Gist options
  • Save chuckg/a6ee0bba4a8059c80505b0929a780150 to your computer and use it in GitHub Desktop.
Save chuckg/a6ee0bba4a8059c80505b0929a780150 to your computer and use it in GitHub Desktop.
Splunk Macro: Convert IP to AWS hostname
# $ip$ is the macro argument
| rex mode=sed field=$ip$ "s/(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})/ip-\1-\2-\3-\4/g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment