<?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: Missing fields in summary index in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Missing-fields-in-summary-index/m-p/37166#M333</link>
    <description>&lt;P&gt;If you insist on storing each message id in the summary index, you can try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; eventtype=cisco_esa [search | fields mid] | stats values(to) as to values(from) as from values(subject) as subject by mid | collect index=summary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, it seems like this is a heavy handed and probably wrong approach.  You would probably be better off using a python script or building some additional business logic in via the Splunk view system, depending on how you want to represent the data.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Dec 2011 23:24:30 GMT</pubDate>
    <dc:creator>araitz</dc:creator>
    <dc:date>2011-12-05T23:24:30Z</dc:date>
    <item>
      <title>Missing fields in summary index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Missing-fields-in-summary-index/m-p/37162#M329</link>
      <description>&lt;P&gt;I have a little problem with summary indexing seemingly ignoring some fields.&lt;/P&gt;

&lt;P&gt;My logfile looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# /home/splunk/foo.log
2011-06-29 12:00:00,000 tx=12345 Starting to process order. orderId=31415
2011-06-29 12:00:01,500 tx=12345 Done processing order. outcome=SUCCESS, info=[orderId=31415, execution_time_ms=1500]
2011-06-29 12:05:00,000 tx=98765 Starting to process order. orderId=67890
2011-06-29 12:05:01,200 tx=98765 Done processing order. outcome=FAILURE, info=[orderId=67890, execution_time_ms=1200]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've scheduled an index-populating query called "index-populating-query" that runs every 15 minutes and saves its results to the summary index:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/home/splunk/foo.log" oútcome=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I run this query from search, Splunk correctly shows all the discovered fields on the left hand side: tx, orderId, outcome, execution_time_ms.&lt;/P&gt;

&lt;P&gt;But when I run queries against the summary index, it seems that the fields tx and outcome aren't contained in the index:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=summary source="index-populating-query" oútcome=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;produces an empty result set, and&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=summary source="index-populating-query" *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;shows the fields orderId and execution_time_ms on the left hand side, but no outcome or tx.&lt;/P&gt;

&lt;P&gt;Does anyone have an explanation for this behaviour?&lt;/P&gt;

&lt;P&gt;I noticed that the missing fields are the ones that aren't following a comma in the log file.&lt;/P&gt;

&lt;P&gt;The outcome field could probably be extracted during my queries against the summary index using a regex (e.g. rex "(?i) outcome=(?P&lt;OUTCOME&gt;[^,]+)"), but doesn't that somehow defeat the purpose of summary indexing?&lt;/OUTCOME&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:42:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Missing-fields-in-summary-index/m-p/37162#M329</guid>
      <dc:creator>seriea</dc:creator>
      <dc:date>2020-09-28T09:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Missing fields in summary index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Missing-fields-in-summary-index/m-p/37163#M330</link>
      <description>&lt;P&gt;In general, summary index generating searches need to use a transforming/reporting command such as timechart, stats, chart, etc.  &lt;/P&gt;

&lt;P&gt;So, you could change your search to be something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; source="/home/splunk/foo.log" oútcome=* | stats count(eval(outcome="FAILURE")) as failures count(eval(outcome="SUCCESS")) as successes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then, your search against the summary index becomes something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=summary source="index-populating-query" | timechart span=5m sum(successes) as successes sum(failures) as failures | fillnull value=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And would yield a result like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; _time               successes   failures
 12/05/11 00:00:00   4           0
 12/05/11 00:05:00   7           1
 12/05/11 00:10:00   6           3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Dec 2011 21:48:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Missing-fields-in-summary-index/m-p/37163#M330</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2011-12-05T21:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Missing fields in summary index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Missing-fields-in-summary-index/m-p/37164#M331</link>
      <description>&lt;P&gt;is there a way to preserve the fields while still populating the index with the full set of events like the requestor has?&lt;/P&gt;

&lt;P&gt;im running into the same issue, but need to run ad hoc search commands... not just preset timecharts.&lt;/P&gt;

&lt;P&gt;for ex. ironport logs all of the "from, to, subject, etc" attributes as separate events on new lines.  most searches i run need to return the full results associated with that mail.&lt;/P&gt;

&lt;P&gt;so i am using a summary index to store the events in transaction form, and then run my searches against that.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2011 23:16:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Missing-fields-in-summary-index/m-p/37164#M331</guid>
      <dc:creator>jshaynes</dc:creator>
      <dc:date>2011-12-05T23:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Missing fields in summary index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Missing-fields-in-summary-index/m-p/37165#M332</link>
      <description>&lt;P&gt;here is the command used to populate the summary index:&lt;/P&gt;

&lt;P&gt;eventtype=cisco_esa [search | fields mid] | transaction fields=mid mvlist=t | collect index=summary&lt;/P&gt;

&lt;P&gt;there is more context in this answer, where folks were recommending the summary index for this use case, even though it isn't the standard usage:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/35267/very-large-lookup-tables-exceeding-2gb-bundle-size"&gt;http://splunk-base.splunk.com/answers/35267/very-large-lookup-tables-exceeding-2gb-bundle-size&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2011 23:18:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Missing-fields-in-summary-index/m-p/37165#M332</guid>
      <dc:creator>jshaynes</dc:creator>
      <dc:date>2011-12-05T23:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Missing fields in summary index</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Missing-fields-in-summary-index/m-p/37166#M333</link>
      <description>&lt;P&gt;If you insist on storing each message id in the summary index, you can try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; eventtype=cisco_esa [search | fields mid] | stats values(to) as to values(from) as from values(subject) as subject by mid | collect index=summary
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, it seems like this is a heavy handed and probably wrong approach.  You would probably be better off using a python script or building some additional business logic in via the Splunk view system, depending on how you want to represent the data.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2011 23:24:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Missing-fields-in-summary-index/m-p/37166#M333</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2011-12-05T23:24:30Z</dc:date>
    </item>
  </channel>
</rss>

