Getting Data In

Why does the following search not return a list of my indexes?

asturt
Explorer
| REST /services/data/indexes

The search shown above is supposed to return a list of all my indexes. It doesn't. I have an index that has 54,000+ events for the last fifteen minutes alone, but it is not included in the list coming back from the rest call.

Am I doing something wrong?

0 Karma

JeffBothel
Explorer

The below link is what I have saved for answering this question and seems to work pretty well for me:

https://answers.splunk.com/answers/39370/is-it-possibl-to-get-a-list-of-available-indices.html

0 Karma

Vijeta
Influencer

Are you running rest command on your indexer or Search head? If running on search head and index is on indexer , you might not be having the privilege to get data using REST from another server except localhost

asturt
Explorer

Well, that's an excellent question, Vijeta. I thought I was running it against the head, but that might be a false assumption. I'll have to check with our admin to find out.

0 Karma

somesoni2
Revered Legend

It returns list of index that the user running above search has access to. Check the role of user running this search to see if that indexes is accessible to user.

asturt
Explorer

I am the user running the report, and it doesn't show all the indexes I can search.

0 Karma

vinaykata
Path Finder

have you tried the basic searches

index="" OR index="_" | dedup index | table index

0 Karma

asturt
Explorer

Well, that works if I change index="" OR index="_" into index="", but the rest service also provides statistics like totalEventCount. At least, it *should provide those, but all of that information seems to be incorrect.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...