<?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 what needs to be added to modify my search to display only the windows hosts? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262502#M78805</link>
    <description>&lt;P&gt;The following is my search query :-&lt;/P&gt;

&lt;P&gt;index=* | regex _raw!=".&lt;EM&gt;2016-\d{2}-\d{2}.&lt;/EM&gt;" | stats values(host) as hosts &lt;/P&gt;

&lt;P&gt;Also is there any way that I can see all the sources per host in which my search string satisfies?&lt;/P&gt;</description>
    <pubDate>Wed, 31 Aug 2016 14:48:52 GMT</pubDate>
    <dc:creator>pavanae</dc:creator>
    <dc:date>2016-08-31T14:48:52Z</dc:date>
    <item>
      <title>what needs to be added to modify my search to display only the windows hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262502#M78805</link>
      <description>&lt;P&gt;The following is my search query :-&lt;/P&gt;

&lt;P&gt;index=* | regex _raw!=".&lt;EM&gt;2016-\d{2}-\d{2}.&lt;/EM&gt;" | stats values(host) as hosts &lt;/P&gt;

&lt;P&gt;Also is there any way that I can see all the sources per host in which my search string satisfies?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 14:48:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262502#M78805</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2016-08-31T14:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: what needs to be added to modify my search to display only the windows hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262503#M78806</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* | regex _raw!=".2016-\d{2}-\d{2}." | stats values(sources) as sources by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Aug 2016 14:51:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262503#M78806</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-31T14:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: what needs to be added to modify my search to display only the windows hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262504#M78807</link>
      <description>&lt;P&gt;index=* | regex _raw!=".2016-\d{2}-\d{2}." | stats list(source) as sources by host&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 15:07:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262504#M78807</guid>
      <dc:creator>appache</dc:creator>
      <dc:date>2016-08-31T15:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: what needs to be added to modify my search to display only the windows hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262505#M78808</link>
      <description>&lt;P&gt;Probably the best way to identify Windows hosts at search time would be to use tags. Settings -&amp;gt; Tags. Be sure to adjust permissions as required in your use case.&lt;/P&gt;

&lt;P&gt;A more dynamic, but also more "expensive", method would be to use a subsearch on the _internal index:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* [ 
    search index=_internal os=Windows sourcetype=splunkd | 
    stats count by hostname | rename hostname as host | fields host ] | 
stats values(source) as sources by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT to add regex command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* [ 
    search index=_internal os=Windows sourcetype=splunkd | 
    stats count by hostname | rename hostname as host | fields host ] | 
regex _raw!=".2016-\d{2}-\d{2}." |
stats values(source) as sources by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 31 Aug 2016 15:25:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262505#M78808</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2016-08-31T15:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: what needs to be added to modify my search to display only the windows hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262506#M78809</link>
      <description>&lt;P&gt;by the above search I am able to see all the windows hosts and sources which is good. But I want to see the hosts and sources which satisfies the search string " index=* | regex _raw!=".2016-\d{2}-\d{2}."  and then I need to filter the results by your search string . so is there any way that I can get the results by using both the search strings. &lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 17:15:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262506#M78809</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2016-08-31T17:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: what needs to be added to modify my search to display only the windows hosts?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262507#M78810</link>
      <description>&lt;P&gt;add your regex command before the stats command: index=* [ &lt;BR /&gt;
     search index=_internal os=Windows sourcetype=splunkd | &lt;BR /&gt;
     stats count by hostname | rename hostname as host | fields host ] | &lt;BR /&gt;
 regex _raw!=".2016-\d{2}-\d{2}." | stats values(source) as sources by host&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2016 17:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/what-needs-to-be-added-to-modify-my-search-to-display-only-the/m-p/262507#M78810</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2016-08-31T17:25:33Z</dc:date>
    </item>
  </channel>
</rss>

