<?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 useing metadata commend to display sourcetype host and sources at the same time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/useing-metadata-commend-to-display-sourcetype-host-and-sources/m-p/294432#M88870</link>
    <description>&lt;P&gt;HI &lt;BR /&gt;
I want to use | metadata commend to display sourcetype host and sources at the same time, so far I cant make connection between them. &lt;BR /&gt;
As we know when I run   | metadata type=sourcetypes search it will return me sourcetype information,like below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;firstTime   lastTime   recentTime sourcetype totalCount type
151572    1515399    152170     RT2RO   108      sourcetypes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;the output I am looking for is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;firstTime   lastTime   recentTime sourcetype totalCount source       host
  151572    1515399    152170       RT2RO   108     \var\log\a   rt2.server.com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can this be done using | metadata command? &lt;BR /&gt;
The reason I want to use it is just because it give result fast &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Thanks in advance&lt;/P&gt;</description>
    <pubDate>Tue, 27 Mar 2018 19:42:54 GMT</pubDate>
    <dc:creator>samlinsongguo</dc:creator>
    <dc:date>2018-03-27T19:42:54Z</dc:date>
    <item>
      <title>useing metadata commend to display sourcetype host and sources at the same time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/useing-metadata-commend-to-display-sourcetype-host-and-sources/m-p/294432#M88870</link>
      <description>&lt;P&gt;HI &lt;BR /&gt;
I want to use | metadata commend to display sourcetype host and sources at the same time, so far I cant make connection between them. &lt;BR /&gt;
As we know when I run   | metadata type=sourcetypes search it will return me sourcetype information,like below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;firstTime   lastTime   recentTime sourcetype totalCount type
151572    1515399    152170     RT2RO   108      sourcetypes
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;the output I am looking for is&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;firstTime   lastTime   recentTime sourcetype totalCount source       host
  151572    1515399    152170       RT2RO   108     \var\log\a   rt2.server.com
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can this be done using | metadata command? &lt;BR /&gt;
The reason I want to use it is just because it give result fast &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 19:42:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/useing-metadata-commend-to-display-sourcetype-host-and-sources/m-p/294432#M88870</guid>
      <dc:creator>samlinsongguo</dc:creator>
      <dc:date>2018-03-27T19:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: useing metadata commend to display sourcetype host and sources at the same time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/useing-metadata-commend-to-display-sourcetype-host-and-sources/m-p/294433#M88871</link>
      <description>&lt;P&gt;hello there,&lt;BR /&gt;
not sure how to achieve with &lt;CODE&gt;| metadata&lt;/CODE&gt; (without &lt;CODE&gt;| append&lt;/CODE&gt; or &lt;CODE&gt;| appendcols&lt;/CODE&gt; ) but give  ashot to the next search:&lt;BR /&gt;
&lt;CODE&gt;|tstats count as event_count min(_time) as firstTime max(_time) as lastTime by host source sourcetype where index=*&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Tue, 27 Mar 2018 19:53:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/useing-metadata-commend-to-display-sourcetype-host-and-sources/m-p/294433#M88871</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-03-27T19:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: useing metadata commend to display sourcetype host and sources at the same time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/useing-metadata-commend-to-display-sourcetype-host-and-sources/m-p/294434#M88872</link>
      <description>&lt;P&gt;Thanks Adonio, not very familiar with tstats but it got what I want thanks again.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Mar 2018 08:50:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/useing-metadata-commend-to-display-sourcetype-host-and-sources/m-p/294434#M88872</guid>
      <dc:creator>samlinsongguo</dc:creator>
      <dc:date>2018-03-28T08:50:28Z</dc:date>
    </item>
  </channel>
</rss>

