This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' Splunk deployment based on CIDR | |
Splunk's deployment server does not support CIDR based matching out of the box, | |
but they do support PCRE regex matching. I found this script online and | |
modified it slightly to match Splunk's specific regex variation. (Basically, | |
Splunk uses standards PCRE but replace the meaning of "." and "*" to act more | |
like traditional glob strings.) The values returned by this script can be | |
used in the serverclass.conf for either whitelist.<n> or blacklist.<n> values. | |
See the Splunk docs for more details. |