Last active
October 10, 2023 10:41
-
-
Save hobbes3/cadbedcdc3e464da03f7 to your computer and use it in GitHub Desktop.
Example Splunk props + transforms
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
# 2014-05-11 12:34:11,372 INFO amec.foobar.com 148.23.14.242 | action = accept | status = 200 | bytes = 235 | method = GET | request = /store/checkout?q=foo&var=123#test | custom_var = some string with a "|" in it | another_var = !@#$1234 | |
[my_sourcetype] | |
# index-time settings: | |
# http://regex101.com/r/fX9lB1 | |
LINE_BREAKER = ([\r\n]+)\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} [A-Z]+ | |
TRUNCATE = 1000 | |
SHOULD_LINEMERGE = false | |
# http://regex101.com/r/lK9xB8 | |
TIME_PREFIX = ^ | |
# http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commontimeformatvariables | |
TIME_FORMAT = %Y-%m-%d %H:%M:%S,%3N | |
MAX_TIMESTAMP_LOOKAHEAD = 23 | |
# http://en.wikipedia.org/wiki/List_of_zoneinfo_timezones | |
TZ = GMT | |
ANNOTATE_PUNCT = false | |
# search-time settings: | |
# http://regex101.com/r/pC9uV5 | |
EXTRACT-fields = (?<severity>[A-Z]+) (?<source_host>\S+) (?<ip>(?:\d{1,3}\.){3}\d{1,3}) \| | |
REPORT-more_fields = key_value | |
KV_MODE = None |
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
# This is referenced from props.conf REPORT- | |
[key_value] | |
# http://regex101.com/r/vI0pD7 | |
REGEX = \| (?<_KEY_1>\w+) = (?<_VAL_1>.+?)(?= \| \w+ = |$) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment