Splunk: List indexes and sources to which one has access

Using this search command

| eventcount summarize=false | dedup index | fields index

I get a list of all indexes I have access to in Splunk. Is it also possible to get another column besides this within which the source for the index is visible too?

EDIT: It seems like I found a solution:

| tstats count WHERE index=* sourcetype=* source=* by index, sourcetype, source | fields - count

This gives back a list with columns for indexes, sourcetypes and sources.

1 Answer

In case the permissions to read sources are not enforced by the tstats, you can join to your original query with an inner join on index, to limit to the indexes that you can see:

| tstats count WHERE index=* OR index=_* by index source
| dedup index source | fields index source
| join type=inner index [| eventcount summarize=false | dedup index | fields index]
0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like