<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How does splunk extract search time fields in &amp;quot;interesting fields&amp;quot;? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-extract-search-time-fields-in-quot-interesting/m-p/558340#M158594</link>
    <description>&lt;P&gt;That's a lot of work to create a backup of an index.&amp;nbsp; Splunk has a document describing how to back up indexed data.&amp;nbsp; See &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.1/Indexer/Backupindexeddata" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.1/Indexer/Backupindexeddata&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Another way to protect your data is via replication done by an indexer cluster.&amp;nbsp; See &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.1/Indexer/Aboutclusters" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.1/Indexer/Aboutclusters&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jul 2021 00:25:00 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2021-07-06T00:25:00Z</dc:date>
    <item>
      <title>How does splunk extract search time fields in "interesting fields"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-extract-search-time-fields-in-quot-interesting/m-p/558248#M158569</link>
      <description>&lt;P&gt;which props.conf setting does splunk use to extract interesting fields from _raw field.&lt;/P&gt;&lt;P&gt;I am trying to use collect command to get _raw data from one index into another. However, it does not extract interesting fields. If I give sourcetype=splunkd. It extracts interesting fields. I understand using a different sourcetype other than stash will take license usage. So, I should be able to create a custom field extraction for the stash source file paths without taking any license.&lt;/P&gt;&lt;P&gt;I did a&amp;nbsp;./splunk btool props list splunkd and this is what it shows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[splunkd]
ADD_EXTRA_TIME_FIELDS = True
ANNOTATE_PUNCT = True
AUTO_KV_JSON = true
BREAK_ONLY_BEFORE = 
BREAK_ONLY_BEFORE_DATE = True
CHARSET = UTF-8
DATETIME_CONFIG = /etc/datetime.xml
DEPTH_LIMIT = 1000
DETERMINE_TIMESTAMP_DATE_WITH_SYSTEM_TIME = false
EXTRACT-fields = (?i)^(?:[^ ]* ){2}(?:[+\-]\d+ )?(?P&amp;lt;log_level&amp;gt;[^ ]*)\s+(?P&amp;lt;component&amp;gt;[^ ]+) - (?P&amp;lt;event_message&amp;gt;.+)
HEADER_MODE = 
LB_CHUNK_BREAKER_TRUNCATE = 2000000
LEARN_MODEL = true
LEARN_SOURCETYPE = true
LINE_BREAKER_LOOKBEHIND = 100
MATCH_LIMIT = 100000
MAX_DAYS_AGO = 2000
MAX_DAYS_HENCE = 2
MAX_DIFF_SECS_AGO = 3600
MAX_DIFF_SECS_HENCE = 604800
MAX_EVENTS = 256
MAX_TIMESTAMP_LOOKAHEAD = 40
MUST_BREAK_AFTER = 
MUST_NOT_BREAK_AFTER = 
MUST_NOT_BREAK_BEFORE = 
SEGMENTATION = indexing
SEGMENTATION-all = full
SEGMENTATION-inner = inner
SEGMENTATION-outer = outer
SEGMENTATION-raw = none
SEGMENTATION-standard = standard
SHOULD_LINEMERGE = false
TIME_FORMAT = %m-%d-%Y %H:%M:%S.%l %z
TRANSFORMS = 
TRUNCATE = 20000
detect_trailing_nulls = false
maxDist = 100
priority = 
sourcetype = 
termFrequencyWeightedDist = false&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for default stanza, it shows :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[default]
ADD_EXTRA_TIME_FIELDS = True
ANNOTATE_PUNCT = True
AUTO_KV_JSON = true
BREAK_ONLY_BEFORE = 
BREAK_ONLY_BEFORE_DATE = True
CHARSET = UTF-8
DATETIME_CONFIG = /etc/datetime.xml
DEPTH_LIMIT = 1000
DETERMINE_TIMESTAMP_DATE_WITH_SYSTEM_TIME = false
HEADER_MODE = 
LB_CHUNK_BREAKER_TRUNCATE = 2000000
LEARN_MODEL = true
LEARN_SOURCETYPE = true
LINE_BREAKER_LOOKBEHIND = 100
MATCH_LIMIT = 100000
MAX_DAYS_AGO = 2000
MAX_DAYS_HENCE = 2
MAX_DIFF_SECS_AGO = 3600
MAX_DIFF_SECS_HENCE = 604800
MAX_EVENTS = 256
MAX_TIMESTAMP_LOOKAHEAD = 128
MUST_BREAK_AFTER = 
MUST_NOT_BREAK_AFTER = 
MUST_NOT_BREAK_BEFORE = 
SEGMENTATION = indexing
SEGMENTATION-all = full
SEGMENTATION-inner = inner
SEGMENTATION-outer = outer
SEGMENTATION-raw = none
SEGMENTATION-standard = standard
SHOULD_LINEMERGE = True
TRANSFORMS = 
TRUNCATE = 10000
detect_trailing_nulls = false
maxDist = 100
priority = 
sourcetype = 
termFrequencyWeightedDist = false&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I verified the data and it is not in json format. So, AUTO_KV_JSON would not apply to it.&lt;/P&gt;&lt;P&gt;The only thing I could find in transforms and props.conf which separate fields based upon "=" is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[ad-kv]
CAN_OPTIMIZE = True
CLEAN_KEYS = True
DEFAULT_VALUE = 
DEPTH_LIMIT = 1000
DEST_KEY = 
FORMAT = 
KEEP_EMPTY_VALS = False
LOOKAHEAD = 4096
MATCH_LIMIT = 100000
MV_ADD = true
REGEX = (?&amp;lt;_KEY_1&amp;gt;[\w-]+)=(?&amp;lt;_VAL_1&amp;gt;[^\r\n]*)
SOURCE_KEY = _raw
WRITE_META = False&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;which is being called by&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[ActiveDirectory]
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+---splunk-admon-end-of-event---\r\n[\r\n]*)
EXTRACT-GUID = (?i)(?!=\w)(?:objectguid|guid)\s*=\s*(?&amp;lt;guid_lookup&amp;gt;[\w\-]+)
EXTRACT-SID = objectSid\s*=\s*(?&amp;lt;sid_lookup&amp;gt;\S+)
REPORT-MESSAGE = ad-kv
# some schema AD events may be very long
MAX_EVENTS = 10000
TRUNCATE = 100000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jul 2021 06:58:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-extract-search-time-fields-in-quot-interesting/m-p/558248#M158569</guid>
      <dc:creator>goelt2000</dc:creator>
      <dc:date>2021-07-04T06:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: How does splunk extract search time fields in "interesting fields"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-extract-search-time-fields-in-quot-interesting/m-p/558253#M158573</link>
      <description>&lt;P&gt;I gave a try to use rex on sourcetype=stash. It is not working. Even a basic regex is not working. Seems like I will have to change the sourcetype in order to get the interesting fields?&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/149"&gt;@splunk&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;- would you have any idea? - thanks&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jul 2021 09:04:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-extract-search-time-fields-in-quot-interesting/m-p/558253#M158573</guid>
      <dc:creator>goelt2000</dc:creator>
      <dc:date>2021-07-04T09:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: How does splunk extract search time fields in "interesting fields"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-extract-search-time-fields-in-quot-interesting/m-p/558258#M158575</link>
      <description>&lt;P&gt;What regex did you use in your &lt;FONT face="courier new,courier"&gt;rex&lt;/FONT&gt; command?&amp;nbsp; I would use the expression in the EXTRACT-fields attribute from props.conf then add more &lt;FONT face="courier new,courier"&gt;rex&lt;/FONT&gt; commands to extract more fields.&lt;/P&gt;&lt;P&gt;Stepping back, what problem are you trying to solve by copying data between indexes?&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jul 2021 14:16:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-extract-search-time-fields-in-quot-interesting/m-p/558258#M158575</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-07-04T14:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: How does splunk extract search time fields in "interesting fields"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-extract-search-time-fields-in-quot-interesting/m-p/558266#M158578</link>
      <description>&lt;P&gt;it was a simple regex. regex was not the issue. as the same regex worked with&amp;nbsp; other sourcetypes, but not stash. These commands worked for me. I am still figuring it out how to retain the original host, source, sourcetype&lt;/P&gt;&lt;P&gt;| extract auto=t&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to merge data from one index into another for a use case. My understanding is collect command does the work. It is also documented here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Collect" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Collect&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Copying events to a different index
You can use the collect command to copy search results to another index. Construct a search that returns the data you want to copy, and pipe the results to the collect command. For example:

index=foo | ... | collect index=bar

This search writes the results into the bar index. The sourcetype is changed to stash.

You can specify a sourcetype with the collect command. However, specifying a sourcetype counts against your license, as if you indexed the data again.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can probably keep the original sourcetypes and host, and source values too. But license usage will become an issue since the amount of data is in TBs. I think I saw a thread about how you can append source, sourcetype, host to _raw.&lt;/P&gt;&lt;P&gt;I am still looking for it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| eval _raw=_raw.orig_host=$host..orig_source=$source&lt;/P&gt;&lt;P&gt;Once it is done, I can use the destination index like&lt;/P&gt;&lt;P&gt;index=destinationindex|eval host=orig_host&amp;nbsp; &amp;nbsp;...|extract auto=t&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I will have a backup index data without consuming more license usage.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It also says: data is stored under:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;The file that is written to the var/spool/splunk path ends in .stash_hec instead of .stash.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while the saved results from normal searches are stored under&amp;nbsp;&lt;/P&gt;&lt;P&gt;var/run/splunk/dispatch.&lt;/P&gt;&lt;P&gt;So, splunk should not replicate the artifacts from spool/splunk to other search head cluster members. I can test it out though.&amp;nbsp; So, that should rule out the results getting replicated across search peers and having duplicate events?&lt;/P&gt;&lt;P&gt;If I do schedule a search with collect command, for this use case, should it be run in fast mode, or verbose mode? or it doesn't matter, most likely scheduled searches always run in fast mode? and where will the results from scheduled search for a collect command get stored, under dispatch or spool?&lt;/P&gt;&lt;P&gt;What fields does collect command collect from source index?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 03:43:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-extract-search-time-fields-in-quot-interesting/m-p/558266#M158578</guid>
      <dc:creator>goelt2000</dc:creator>
      <dc:date>2021-07-05T03:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: How does splunk extract search time fields in "interesting fields"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-extract-search-time-fields-in-quot-interesting/m-p/558340#M158594</link>
      <description>&lt;P&gt;That's a lot of work to create a backup of an index.&amp;nbsp; Splunk has a document describing how to back up indexed data.&amp;nbsp; See &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.1/Indexer/Backupindexeddata" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.1/Indexer/Backupindexeddata&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Another way to protect your data is via replication done by an indexer cluster.&amp;nbsp; See &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.1/Indexer/Aboutclusters" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.1/Indexer/Aboutclusters&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 00:25:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-does-splunk-extract-search-time-fields-in-quot-interesting/m-p/558340#M158594</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-07-06T00:25:00Z</dc:date>
    </item>
  </channel>
</rss>

