<?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 Data model in custom search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Data-model-in-custom-search/m-p/575044#M200380</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a doubt regarding the datamodel use.&lt;/P&gt;&lt;P&gt;In Splunk Foundamentals 2 course, I got what Data Models is and how to use it with Pivot.&lt;/P&gt;&lt;P&gt;My doubt now is the following: is it possible to use a datamodel and its field in a custom search, for example in the Search and Reporting app? And if yes, how?&lt;/P&gt;&lt;P&gt;Suppose I have to perform a simple search like this one on network traffic:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index=&amp;lt;some index&amp;gt; sourcetype=&amp;lt;some_sourcetype&amp;gt;| stats count src as source by dest as destination&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Suppose now I want to use Network Traffic Data model and its Data set All_Traffic to perform this search, to avoid the use of index and sourcetype; is this possible? And if yes, how to perform this search?&lt;/P&gt;</description>
    <pubDate>Tue, 16 Nov 2021 13:39:39 GMT</pubDate>
    <dc:creator>SIEMStudent</dc:creator>
    <dc:date>2021-11-16T13:39:39Z</dc:date>
    <item>
      <title>Data model in custom search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-model-in-custom-search/m-p/575044#M200380</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a doubt regarding the datamodel use.&lt;/P&gt;&lt;P&gt;In Splunk Foundamentals 2 course, I got what Data Models is and how to use it with Pivot.&lt;/P&gt;&lt;P&gt;My doubt now is the following: is it possible to use a datamodel and its field in a custom search, for example in the Search and Reporting app? And if yes, how?&lt;/P&gt;&lt;P&gt;Suppose I have to perform a simple search like this one on network traffic:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index=&amp;lt;some index&amp;gt; sourcetype=&amp;lt;some_sourcetype&amp;gt;| stats count src as source by dest as destination&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Suppose now I want to use Network Traffic Data model and its Data set All_Traffic to perform this search, to avoid the use of index and sourcetype; is this possible? And if yes, how to perform this search?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 13:39:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-model-in-custom-search/m-p/575044#M200380</guid>
      <dc:creator>SIEMStudent</dc:creator>
      <dc:date>2021-11-16T13:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data model in custom search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Data-model-in-custom-search/m-p/575076#M200386</link>
      <description>&lt;P&gt;There are a couple of ways to do that (and perhaps others).&lt;/P&gt;&lt;P&gt;The fastest is to use the &lt;FONT face="courier new,courier"&gt;tstats&lt;/FONT&gt; command.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count(foo.src) as source from datamodel=foo by foo.dest
| rename foo.dest as destination&lt;/LI-CODE&gt;&lt;P&gt;The other method uses the from command.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| from datamodel foo | stats count(src) as source by dest 
| rename dest as destination&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Nov 2021 15:44:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Data-model-in-custom-search/m-p/575076#M200386</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-11-16T15:44:43Z</dc:date>
    </item>
  </channel>
</rss>

