Splunk Search

Can someone tell me how to count users by index please

Rlemana
New Member

I was trying to keep track of how many users have access to each index. Any help would be much appreciated.

Tags (2)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

This should do the trick:

| rest /services/authentication/users | table title roles | mvexpand roles | join max=0 type=left roles [rest /services/authorization/roles | table title srchIndexesAllowed | rename title as roles | mvexpand srchIndexesAllowed] | stats dc(title) by srchIndexesAllowed

You'll see values for srchIndexesAllowed of "*" and "_*", those mean "all non-internal indexes" and "all internal indexes" respectively.

0 Karma
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In November, the Splunk Threat Research Team had one release of new security content via the Enterprise ...

Index This | Divide 100 by half. What do you get?

November 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...

Stay Connected: Your Guide to December Tech Talks, Office Hours, and Webinars!

❄️ Celebrate the season with our December lineup of Community Office Hours, Tech Talks, and Webinars! ...