<?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: Creating a column for each field in a count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108390#M28223</link>
    <description>&lt;P&gt;Good point Gilberto!  And a big timesaver.  You could download that app and then all the lookups would work assuming the field names for the lookup match to the field names he is using.  An easy fix either way.&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jul 2012 20:38:07 GMT</pubDate>
    <dc:creator>dmaislin_splunk</dc:creator>
    <dc:date>2012-07-25T20:38:07Z</dc:date>
    <item>
      <title>Creating a column for each field in a count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108384#M28217</link>
      <description>&lt;P&gt;I have a search for failed login attempts and am running a count based on EventCodes per host. &lt;/P&gt;

&lt;P&gt;("EventCode=4625" OR "EventCode=529" OR "EventCode=530" OR "EventCode=531" OR "EventCode=532" OR "EventCode=533" OR "EventCode=534" OR "EventCode=535" OR "EventCode=536" OR "EventCode=537" OR "EventCode=539") | stats count by host, EventCode&lt;/P&gt;

&lt;PRE&gt;host       EventCode    count  
host1        4625         3  
host1        529          6 
host2        529          3 
host3        529          6 
host3        4625         1 
&lt;/PRE&gt;

&lt;P&gt;Instead of listing each host multiple times for each EventCode, how can I have the host listed once with each EventCode in its own column as I have below.&lt;/P&gt;

&lt;PRE&gt;host        529         4625
host1        6            3
host2        3
host3        6            1
&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Jul 2012 18:44:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108384#M28217</guid>
      <dc:creator>tpowell12</dc:creator>
      <dc:date>2012-07-25T18:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column for each field in a count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108385#M28218</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;("EventCode=4625" OR "EventCode=529" OR "EventCode=530" OR "EventCode=531" OR "EventCode=532" OR "EventCode=533" OR "EventCode=534" OR "EventCode=535" OR "EventCode=536" OR "EventCode=537" OR "EventCode=539") | chart count(EventCode) over host by EventCode
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Jul 2012 19:31:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108385#M28218</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2012-07-25T19:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column for each field in a count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108386#M28219</link>
      <description>&lt;P&gt;Thanks for the quick response. Yeah, that solves it. Now from here, can I alias each of the EventCodes in the chart with something that I can understand rather than having the code number displayed?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2012 19:50:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108386#M28219</guid>
      <dc:creator>tpowell12</dc:creator>
      <dc:date>2012-07-25T19:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column for each field in a count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108387#M28220</link>
      <description>&lt;P&gt;What you want to do is create a lookup table with Splunk and then you can do:&lt;/P&gt;

&lt;P&gt;chart count(EventCode) over host by EventCodeDescription&lt;/P&gt;

&lt;P&gt;Have you done a lookup table yet?  If you are happy with my answer, please accept it.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2012 19:55:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108387#M28220</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2012-07-25T19:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column for each field in a count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108388#M28221</link>
      <description>&lt;P&gt;See this:  &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/User/CreateAndConfigureFieldLookups"&gt;http://docs.splunk.com/Documentation/Splunk/latest/User/CreateAndConfigureFieldLookups&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2012 20:06:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108388#M28221</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2012-07-25T20:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column for each field in a count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108389#M28222</link>
      <description>&lt;P&gt;There is also an eventcode lookup in Splunkbase. Download it here: &lt;A href="http://splunk-base.splunk.com/apps/22357/windows-event-codes-lookup"&gt;http://splunk-base.splunk.com/apps/22357/windows-event-codes-lookup&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2012 20:12:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108389#M28222</guid>
      <dc:creator>Gilberto_Castil</dc:creator>
      <dc:date>2012-07-25T20:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column for each field in a count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108390#M28223</link>
      <description>&lt;P&gt;Good point Gilberto!  And a big timesaver.  You could download that app and then all the lookups would work assuming the field names for the lookup match to the field names he is using.  An easy fix either way.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jul 2012 20:38:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Creating-a-column-for-each-field-in-a-count/m-p/108390#M28223</guid>
      <dc:creator>dmaislin_splunk</dc:creator>
      <dc:date>2012-07-25T20:38:07Z</dc:date>
    </item>
  </channel>
</rss>

