<?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 to get a list of all hosts across all indexes if we cannot use index=* (restricted  by workload rule) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-list-of-all-hosts-across-all-indexes-if-we-cannot/m-p/665804#M228444</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184259"&gt;@mlevsh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the easiest way is asking to remove that rule because it isn't useful!&lt;/P&gt;&lt;P&gt;Anyway, you should list all the existing indexes in the WHERE condition:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index IN (index1,index2,index2) by index host
| fields - count&lt;/LI-CODE&gt;&lt;P&gt;to avoid to repeat this list in every command, you could also put all these indexes in a macro or an eventtype and use it in your searches.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 23 Oct 2023 06:21:40 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-10-23T06:21:40Z</dc:date>
    <item>
      <title>How to get a list of all hosts across all indexes if we cannot use index=* (restricted  by workload rule)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-list-of-all-hosts-across-all-indexes-if-we-cannot/m-p/665786#M228433</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;We need to find all the hosts across all the indexes , but we cannot use index=* anymore, as it's use is&amp;nbsp; restricted by workload rule.&lt;BR /&gt;&lt;BR /&gt;Before the following command was used&lt;BR /&gt;&lt;SPAN&gt;| tstats count where index=*&amp;nbsp; by host&lt;BR /&gt;&lt;/SPAN&gt;|fields - count&lt;BR /&gt;&lt;BR /&gt;But it uses index* and now we cannot use it.&lt;BR /&gt;Will appreciate any ideas.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 22:25:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-list-of-all-hosts-across-all-indexes-if-we-cannot/m-p/665786#M228433</guid>
      <dc:creator>mlevsh</dc:creator>
      <dc:date>2023-10-22T22:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a list of all hosts across all indexes if we cannot use index=* (restricted  by workload rule)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-list-of-all-hosts-across-all-indexes-if-we-cannot/m-p/665804#M228444</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184259"&gt;@mlevsh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the easiest way is asking to remove that rule because it isn't useful!&lt;/P&gt;&lt;P&gt;Anyway, you should list all the existing indexes in the WHERE condition:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index IN (index1,index2,index2) by index host
| fields - count&lt;/LI-CODE&gt;&lt;P&gt;to avoid to repeat this list in every command, you could also put all these indexes in a macro or an eventtype and use it in your searches.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 06:21:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-list-of-all-hosts-across-all-indexes-if-we-cannot/m-p/665804#M228444</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-23T06:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a list of all hosts across all indexes if we cannot use index=* (restricted  by workload rule)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-list-of-all-hosts-across-all-indexes-if-we-cannot/m-p/665942#M228467</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;Thank you for your advice!&lt;BR /&gt;&lt;BR /&gt;(1) It will be kind of difficult to list all 280&amp;nbsp; indexes. We can probably decrease it to 68 by using&lt;BR /&gt;something like index=p*&lt;BR /&gt;I was wondering if there might be another alternative way to do it without listing all the indexes&lt;BR /&gt;in search of in macro&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;(2) The rule is actually useful to us, since we had few issues with performance due to users&lt;BR /&gt;using index=*&amp;nbsp; , selecting big time period and searching for some "text" through all of our 280+ indexes&lt;BR /&gt;&lt;BR /&gt;But just curious on why are you saying it isn't useful?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184259"&gt;@mlevsh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 22:49:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-list-of-all-hosts-across-all-indexes-if-we-cannot/m-p/665942#M228467</guid>
      <dc:creator>mlevsh</dc:creator>
      <dc:date>2023-10-23T22:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a list of all hosts across all indexes if we cannot use index=* (restricted  by workload rule)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-list-of-all-hosts-across-all-indexes-if-we-cannot/m-p/666023#M228487</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184259"&gt;@mlevsh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;maybe you should try to have a different approach in indexes creation: usually different indexes are used when there are different retention periods and/or different access grants.&lt;/P&gt;&lt;P&gt;Indexes are siloes in which it's possible to store data, different data are differentiated by sourcetype not by index.&lt;/P&gt;&lt;P&gt;So you could reduce the number of indexes: 280 indexes are very difficoult to manage and to use, why do you have so many indexes?&lt;/P&gt;&lt;P&gt;In other words there isn't any sense&amp;nbsp; having one sourcetype in one index.&lt;/P&gt;&lt;P&gt;In other words, indexes aren't database tables.&lt;/P&gt;&lt;P&gt;the best approach is usually to limit the time that a user can use in a search and not the indexes.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 15:34:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-list-of-all-hosts-across-all-indexes-if-we-cannot/m-p/666023#M228487</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-24T15:34:12Z</dc:date>
    </item>
  </channel>
</rss>

