<?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 do I show other fields after top? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266682#M80173</link>
    <description>&lt;P&gt;As I said, your desire is nonsensical.  If you can explain a rational context for your desire (what kind of &lt;CODE&gt;_time&lt;/CODE&gt; value makes any sense at all) then people can give you a solution that uses a &lt;CODE&gt;stats&lt;/CODE&gt; instead of &lt;CODE&gt;top&lt;/CODE&gt;.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jul 2016 12:57:17 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2016-07-20T12:57:17Z</dc:date>
    <item>
      <title>How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266672#M80163</link>
      <description>&lt;P&gt;I'm not able to show other fields after top, below is my search string.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* type=event subtype=system logid=0100041000 | rex field=_raw "virdb\((?&amp;lt;virdbver&amp;gt;.*?)\) etdb\((?&amp;lt;etdbver&amp;gt;.*?)\)" | top 1 virdbver by devname | fields - percent count | sort -date -time | rename date as "Date:", time as "Time:", devname as "Device Name:", virdbver as "AV Definitions:"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The other fields I'm trying to show are, the date and time field. When I searched regarding this, I kept getting results saying that it's not possible to show other fields after doing top.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 10:28:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266672#M80163</guid>
      <dc:creator>ZacEsa</dc:creator>
      <dc:date>2016-07-20T10:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266673#M80164</link>
      <description>&lt;P&gt;After the top command you are creating a table with 4 fields: virdbver, devname, count and percent. If you want the field date and time, you must use them on the top command e.g: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* type=event subtype=system logid=0100041000 | rex field=_raw "virdb\((?.*?)\) etdb\((?.*?)\)" | top 1 virdbver by devname, date, time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jul 2016 11:41:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266673#M80164</guid>
      <dc:creator>gfreitas</dc:creator>
      <dc:date>2016-07-20T11:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266674#M80165</link>
      <description>&lt;P&gt;by this &lt;CODE&gt;fields - percent count&lt;/CODE&gt;, you are restricting the results only to two fields - "percent count". &lt;BR /&gt;
please try -  &lt;CODE&gt;fields - percent count date time&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=* type=event subtype=system logid=0100041000 | rex field=_raw "virdb\((?.*?)\) etdb\((?.*?)\)" | top 1 virdbver by devname | fields - percent count date time | sort -date -time | rename date as "Date:", time as "Time:", devname as "Device Name:", virdbver as "AV Definitions:"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jul 2016 11:50:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266674#M80165</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-07-20T11:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266675#M80166</link>
      <description>&lt;P&gt;Wow. Thanks! I didn't put the comma and it didn't work. That was why I asked the question. But I do have another problem. How do I move the columns?&lt;/P&gt;

&lt;P&gt;EDIT: Sorry, it doesn't work. Once I put in the date and time, all the values come back. I only want the one with the highest virdbver value of each devname.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 12:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266675#M80166</guid>
      <dc:creator>ZacEsa</dc:creator>
      <dc:date>2016-07-20T12:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266676#M80167</link>
      <description>&lt;P&gt;&lt;EM&gt;But I do have another problem. How do I move the columns?&lt;/EM&gt; &lt;BR /&gt;
on the "rename" command, you can change/move the "order" to move the columns.&lt;BR /&gt;
rename  virdbver as "AV Definitions:", devname as "Device Name:", date as "Date:", time as "Time:"&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 12:27:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266676#M80167</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-07-20T12:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266677#M80168</link>
      <description>&lt;P&gt;That doesn't work. As you can see from above, I've already set it to rename date as "Date:", time as "Time:", devname as "Device Name:", virdbver as "AV Definitions:" but yet, it's coming out as Device Name, Date, Time, AV Definitions.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 12:42:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266677#M80168</guid>
      <dc:creator>ZacEsa</dc:creator>
      <dc:date>2016-07-20T12:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266678#M80169</link>
      <description>&lt;P&gt;You cannot show fields after &lt;CODE&gt;top&lt;/CODE&gt;.  This command does a statistical summary of the raw events and this process (obviously) consumes (supplants) those raw events.  Think about it: If you asked "What were the top 10 most dangerous cities last year?"  What "date" would you use?  If your answer is &lt;CODE&gt;2015&lt;/CODE&gt; then you can do this by adding &lt;CODE&gt;| addinfo&lt;/CODE&gt; to the end of your search.  This will add &lt;CODE&gt;info_min_time&lt;/CODE&gt; and &lt;CODE&gt;info_max_time&lt;/CODE&gt; to your search and you can do what you please with that.  If you had any other answer, you are not only out of luck, but a rather strange person.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 12:49:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266678#M80169</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-20T12:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266679#M80170</link>
      <description>&lt;P&gt;Don't know why my previous reply to your comment got removed but, "fields - percent count" removes those fields.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 12:51:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266679#M80170</guid>
      <dc:creator>ZacEsa</dc:creator>
      <dc:date>2016-07-20T12:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266680#M80171</link>
      <description>&lt;P&gt;addinfo unfortunately adds information about that search though. the date and time fields are from the event itself.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 12:53:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266680#M80171</guid>
      <dc:creator>ZacEsa</dc:creator>
      <dc:date>2016-07-20T12:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266681#M80172</link>
      <description>&lt;P&gt;If you have fields &lt;CODE&gt;C A B&lt;/CODE&gt; in that order, you can rearrange them like this &lt;CODE&gt;| fields A B C&lt;/CODE&gt; and to rename then you just add this &lt;CODE&gt;| rename A AS X B AS Y C AS Z&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 12:55:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266681#M80172</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-20T12:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266682#M80173</link>
      <description>&lt;P&gt;As I said, your desire is nonsensical.  If you can explain a rational context for your desire (what kind of &lt;CODE&gt;_time&lt;/CODE&gt; value makes any sense at all) then people can give you a solution that uses a &lt;CODE&gt;stats&lt;/CODE&gt; instead of &lt;CODE&gt;top&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 12:57:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266682#M80173</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-20T12:57:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266683#M80174</link>
      <description>&lt;P&gt;I understand your "What were the top 10 most dangerous cities last year?" thingy but look at it this way instead,&lt;BR /&gt;
"What's the latest AV definition on this device and when did it update?" That's what I want to know.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 12:58:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266683#M80174</guid>
      <dc:creator>ZacEsa</dc:creator>
      <dc:date>2016-07-20T12:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266684#M80175</link>
      <description>&lt;P&gt;but putting fields after top will undo the top. For example if I don't have fields after top, it gets me the top value for virdbver by devname as such,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;              firewall1                   definition1.11
              firewall2                   definition1.11
              firewall3                   definition1.09
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but after I put in fields, it becomes like this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;              firewall1                   definition1.11
              firewall1                   definition1.10
              firewall1                   definition1.09
              firewall2                   definition1.11
              firewall3                   definition1.09
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jul 2016 13:02:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266684#M80175</guid>
      <dc:creator>ZacEsa</dc:creator>
      <dc:date>2016-07-20T13:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266685#M80176</link>
      <description>&lt;P&gt;I'm sorry but, I don't get you. Why is my desire nonsensical? I'm trying to Splunk to only show the highest definition value of devname and show the date and time of when it updated to said value of definition. Why is this desire nonsensical?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 13:06:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266685#M80176</guid>
      <dc:creator>ZacEsa</dc:creator>
      <dc:date>2016-07-20T13:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266686#M80177</link>
      <description>&lt;P&gt;You are misunderstanding what &lt;CODE&gt;top&lt;/CODE&gt; does and assuming that it is like &lt;CODE&gt;head&lt;/CODE&gt;.  Even though there is a &lt;CODE&gt;head&lt;/CODE&gt; command, it cannot be vectored like you are desiring.  What you need is the &lt;CODE&gt;dedup&lt;/CODE&gt; command.  Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* type=event subtype=system logid=0100041000 | rex field=_raw "virdb\((?&amp;lt;virdbver&amp;gt;.*?)\) etdb\((?&amp;lt;etdbver&amp;gt;.*?)\)"
| dedup devname
| table date time devname virdbver
| rename date AS "Date:" time AS "Time:", devname AS "Device Name:" virdbver AS "AV Definitions:"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternatively, you may be seeking this (if there can ever be downgrades to the virdbver):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* type=event subtype=system logid=0100041000 | rex field=_raw "virdb\((?&amp;lt;virdbver&amp;gt;.*?)\) etdb\((?&amp;lt;etdbver&amp;gt;.*?)\)"
| sort 0 - virdbver
| dedup devname
| table date time devname virdbver
| rename date AS "Date:" time AS "Time:", devname AS "Device Name:" virdbver AS "AV Definitions:"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note: perhaps you will need to use &lt;CODE&gt;sort 0 virdbver&lt;/CODE&gt; instead of &lt;CODE&gt;sort 0 - virdbver&lt;/CODE&gt;; try both.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 13:10:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266686#M80177</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-20T13:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266687#M80178</link>
      <description>&lt;P&gt;Yes! Thank you so much! The second one worked like a charm! First one doesn't work because like I said in my other comment, some events don't have virdbver fields. The sorting of virdbver removes those events without virdbver field. Genius!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 13:31:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266687#M80178</guid>
      <dc:creator>ZacEsa</dc:creator>
      <dc:date>2016-07-20T13:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266688#M80179</link>
      <description>&lt;P&gt;Now do you see why I said your request was "nonsensical"?  The only context that you gave us was your search in which you were (MIS)using the &lt;CODE&gt;top&lt;/CODE&gt; command.  Here are your mistakes:&lt;/P&gt;

&lt;P&gt;1: You did not take the time to clearly explain what you were trying to do.&lt;BR /&gt;
2: You made assumptions about how the &lt;CODE&gt;top&lt;/CODE&gt; command works without reading the documentation.&lt;BR /&gt;
3: Despite &lt;EM&gt;many&lt;/EM&gt; comments and answers, you did not clearly restate your desires.&lt;BR /&gt;
4: You downvoted people who were 100% correct (about your question being nonsensical).&lt;/P&gt;

&lt;P&gt;As a result, many people wasted much time trying to help you and the worst part is that some were actually penalized for it.  This is not the way to get help in the future.  The bottom line is:&lt;/P&gt;

&lt;P&gt;The BETTER QUALITY question that you ask, then quicker and better quality answers you will get.  It is &lt;EM&gt;mostly&lt;/EM&gt; up to you.  We don't know what you &lt;EM&gt;mean&lt;/EM&gt;; we have no choice but to go by what you &lt;EM&gt;say&lt;/EM&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 13:41:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266688#M80179</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-20T13:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266689#M80180</link>
      <description>&lt;P&gt;I already explained why it is nonsensical.  Go back and re-read it.  Maybe you need to read the documentation for the &lt;CODE&gt;top&lt;/CODE&gt; command:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/top"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/top&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 13:43:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266689#M80180</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-20T13:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I show other fields after top?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266690#M80181</link>
      <description>&lt;P&gt;Now I see your problem; see new answer.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 13:44:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-show-other-fields-after-top/m-p/266690#M80181</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-07-20T13:44:09Z</dc:date>
    </item>
  </channel>
</rss>

