<?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 you table multiple interesting fields values side by side? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-table-multiple-interesting-fields-values-side-by-side/m-p/393141#M114378</link>
    <description>&lt;P&gt;It is difficult to know exactly how to address this without an example event. Assuming that the "application" field is the one that filled with one of the possible application names, then you could use the fillnull command to assign a specific value and then filter on that - for example&lt;/P&gt;

&lt;P&gt;| fillnull value="no app" application | search application="no app" |stats values (application) by site computer&lt;/P&gt;

&lt;P&gt;This will assign the application field with the value "no app" when this field does not exist in a raw event. The search command then filters out any event which does not have an application assigned. Assuming there are computers with no applications assigned or you initial search is just for a single application, is missing that one application. &lt;/P&gt;</description>
    <pubDate>Tue, 28 May 2019 21:53:49 GMT</pubDate>
    <dc:creator>wyfwa4</dc:creator>
    <dc:date>2019-05-28T21:53:49Z</dc:date>
    <item>
      <title>How do you table multiple interesting fields values side by side?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-table-multiple-interesting-fields-values-side-by-side/m-p/393138#M114375</link>
      <description>&lt;P&gt;I would like to create a table that shows a list of all computers that have specific apps installed and those that don't, but I'm not sure how to do it. I added the interesting fields and their values below.&lt;/P&gt;

&lt;P&gt;(interesting fields) &lt;BR /&gt;
sites&lt;BR /&gt;
computer names&lt;BR /&gt;
applications&lt;/P&gt;

&lt;P&gt;(field values)&lt;BR /&gt;
site - TX - CA - NY&lt;BR /&gt;
computer names - Dell001 - Dell002 - Dell003&lt;BR /&gt;
applications - firefox - internet explorer - chrome&lt;/P&gt;

&lt;P&gt;EXAMPLE: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;site   computer   application  application   application
TX    DELL001   chrome     firefox     internet explorer
CA    DELL002               firefox
NY    DELL003   chrome                  internet explorer
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 May 2019 16:09:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-table-multiple-interesting-fields-values-side-by-side/m-p/393138#M114375</guid>
      <dc:creator>talaveralino</dc:creator>
      <dc:date>2019-05-28T16:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do you table multiple interesting fields values side by side?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-table-multiple-interesting-fields-values-side-by-side/m-p/393139#M114376</link>
      <description>&lt;P&gt;I would need more details on the structure of the raw event - specifically whether each raw event contained all of the data for each computer, or whether these field values come from lots of different events, but are not generally within the same event. &lt;/P&gt;

&lt;P&gt;If all the events contain all fields, then you could use the table command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;search for events &amp;gt;| table site computer application
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The likely problem with this approach, is that you will get multiple events per computer as each event will have a row displayed. So the better approach is to use the "stats" command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;search for events &amp;gt;| stats values(application) by site computer 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This approach will only show one line for each combination of site and computer. However  There are two possible issues with this approach . Firstly the list of applications will be in a single column for each site/computer - nice to look at, but not good for CSV export. Secondly, it assumes that every event will contain both the site and computer fields. &lt;/P&gt;

&lt;P&gt;How you proceed would depend on your raw data. Assuming you have a fixed list of applications, the simplest approach would be to create new fields for each application.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;search for events &amp;gt;| mvexpand application |eval chrome=if(application="chrome", "yes", "no" ) |eval chrome=if(application="firefox", "yes", "no" ) |eval chrome=if(application="internet explorer", "yes", "no" )|stats values(chrome) values(firefox) values("internet explorer") by site computer 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Firstly we use "mvexpand" to create new events for each value of application (only required if a single event has multiple values for the application field), then we create new fields for each application and assign a value of yes/no to each field. The stats command then creates a table which indicates if that application is installed or not. You could assign the application name to the field if that is the value you want to appear in the table. &lt;/P&gt;

&lt;P&gt;If you do not know what applications you are looking for , then you would have to do a bit more advanced processing and use automatic field naming (based on the values) and wildcard for the field names in the stats command.  &lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 18:14:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-table-multiple-interesting-fields-values-side-by-side/m-p/393139#M114376</guid>
      <dc:creator>wyfwa4</dc:creator>
      <dc:date>2019-05-28T18:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do you table multiple interesting fields values side by side?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-table-multiple-interesting-fields-values-side-by-side/m-p/393140#M114377</link>
      <description>&lt;P&gt;I don't have a fixed list of applications unfortunately. I think I was making things too complicated, so I changed my searches. I have one search showing a total number of computers at site and another showing me a total number of computers with a specific app. The problem I have now is that the total number of computers is 316 and total number of computers with the app is 313. I'm not sure how to find the 3 computers missing the app. &lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 20:42:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-table-multiple-interesting-fields-values-side-by-side/m-p/393140#M114377</guid>
      <dc:creator>talaveralino</dc:creator>
      <dc:date>2019-05-28T20:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do you table multiple interesting fields values side by side?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-table-multiple-interesting-fields-values-side-by-side/m-p/393141#M114378</link>
      <description>&lt;P&gt;It is difficult to know exactly how to address this without an example event. Assuming that the "application" field is the one that filled with one of the possible application names, then you could use the fillnull command to assign a specific value and then filter on that - for example&lt;/P&gt;

&lt;P&gt;| fillnull value="no app" application | search application="no app" |stats values (application) by site computer&lt;/P&gt;

&lt;P&gt;This will assign the application field with the value "no app" when this field does not exist in a raw event. The search command then filters out any event which does not have an application assigned. Assuming there are computers with no applications assigned or you initial search is just for a single application, is missing that one application. &lt;/P&gt;</description>
      <pubDate>Tue, 28 May 2019 21:53:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-table-multiple-interesting-fields-values-side-by-side/m-p/393141#M114378</guid>
      <dc:creator>wyfwa4</dc:creator>
      <dc:date>2019-05-28T21:53:49Z</dc:date>
    </item>
  </channel>
</rss>

