<?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: List of users who searched data of an index in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498059#M194853</link>
    <description>&lt;P&gt;I have used the query you have provided but it is not giving any results.&lt;BR /&gt;
| tstats count where index=_audit TERM("_internal") by PREFIX("user=")&lt;/P&gt;

&lt;P&gt;Also tried like this, but no use.&lt;BR /&gt;
| tstats count where index=_audit by user&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 05:25:53 GMT</pubDate>
    <dc:creator>svelagala</dc:creator>
    <dc:date>2020-09-30T05:25:53Z</dc:date>
    <item>
      <title>List of users who searched data of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498057#M194851</link>
      <description>&lt;P&gt;How to get users(SAML authenticated) list who searched for data under particular index(_internal) in the last 24hrs.&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 19:42:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498057#M194851</guid>
      <dc:creator>svelagala</dc:creator>
      <dc:date>2020-05-16T19:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: List of users who searched data of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498058#M194852</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| tstats count where index=_audit TERM("_internal") by PREFIX("user=")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 May 2020 23:16:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498058#M194852</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-16T23:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: List of users who searched data of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498059#M194853</link>
      <description>&lt;P&gt;I have used the query you have provided but it is not giving any results.&lt;BR /&gt;
| tstats count where index=_audit TERM("_internal") by PREFIX("user=")&lt;/P&gt;

&lt;P&gt;Also tried like this, but no use.&lt;BR /&gt;
| tstats count where index=_audit by user&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:25:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498059#M194853</guid>
      <dc:creator>svelagala</dc:creator>
      <dc:date>2020-09-30T05:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: List of users who searched data of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498060#M194854</link>
      <description>&lt;P&gt;&lt;CODE&gt;PREFIX()&lt;/CODE&gt; can work on splunk ver 8.&lt;BR /&gt;
&lt;CODE&gt;user&lt;/CODE&gt; is extracted at search time. so, you are not able to use with &lt;CODE&gt;tstats&lt;/CODE&gt;&lt;BR /&gt;
If your splunk version is ver 7.X:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_audit TERM("_internal") | stats count by user
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It's faster when &lt;CODE&gt;PREFIX&lt;/CODE&gt; can be used.&lt;/P&gt;</description>
      <pubDate>Sun, 17 May 2020 21:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498060#M194854</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-17T21:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: List of users who searched data of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498061#M194855</link>
      <description>&lt;P&gt;Yes, it is 7.X for us.&lt;BR /&gt;
index=_audit TERM("_internal") | stats count by user - this works good, but I would like to know the list of users based on index names.&lt;BR /&gt;
For Example: &lt;BR /&gt;
I would like to know the users who searched for all the index names ending with "_archive" like _internal_archive. if I run the below it is also giving wherever "_archive" is used, instead of not only in index names.&lt;BR /&gt;
index=_audit TERM("*_archive") | stats count by user&lt;/P&gt;

&lt;P&gt;Can you help me on this &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:27:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498061#M194855</guid>
      <dc:creator>svelagala</dc:creator>
      <dc:date>2020-09-30T05:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: List of users who searched data of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498062#M194856</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=_audit TERM("_internal") 
| stats count values(search) as search by user
| mvexpand search
| rex field=search "index=(?\S+)"
| eval index=trim(index,"\"")
| stats values(user) by index
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 May 2020 09:48:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498062#M194856</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-18T09:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: List of users who searched data of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498063#M194857</link>
      <description>&lt;P&gt;index=_audit TERM("_internal")&lt;BR /&gt;
| stats count values(search) as search by user&lt;BR /&gt;
| mvexpand search&lt;BR /&gt;
| rex field=search "index=(?\S+)"&lt;BR /&gt;
| eval index=trim(index,"\"")&lt;BR /&gt;
| stats values(user) by index&lt;/P&gt;

&lt;P&gt;Above query almost worked but it is giving only results related to _internal index. Actually, I am looking for indexes ending with "_archive". Hence I tried in the below way.&lt;/P&gt;

&lt;P&gt;index=_audit&lt;BR /&gt;
| stats count values(search) as search by user&lt;BR /&gt;
| mvexpand search&lt;BR /&gt;
| rex field=search "index=(?\S+)"&lt;BR /&gt;
| eval index=trim(index,"\"")&lt;BR /&gt;
| stats values(user) by index&lt;BR /&gt;
|search index=*_archive&lt;/P&gt;

&lt;P&gt;let me know in case any optimization/better query can be provided &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:27:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498063#M194857</guid>
      <dc:creator>svelagala</dc:creator>
      <dc:date>2020-09-30T05:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: List of users who searched data of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498064#M194858</link>
      <description>&lt;P&gt;It is not profitable.&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 13:25:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498064#M194858</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-18T13:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: List of users who searched data of an index</title>
      <link>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498065#M194859</link>
      <description>&lt;P&gt;Then what could be suitable query for my requirement @to4kawa &lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 14:03:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/List-of-users-who-searched-data-of-an-index/m-p/498065#M194859</guid>
      <dc:creator>svelagala</dc:creator>
      <dc:date>2020-05-18T14:03:11Z</dc:date>
    </item>
  </channel>
</rss>

