Getting Data In

Rest command from saved search

reed_kelly
Contributor

I'm trying to capture index disk utilization to a summary index using a rest command. The command is something like:
|rest /services/data/indexes |table splunk_server,title,currentDBSizeMB

This produces a nice table with indexers, indexes and how much disk space each index is taking.

When I run this from a scheduled search, however, I get the following warning in the Inspect screen:
...
WARN: Unable to fetch REST endpoint '/services/data/indexes' from "

In addition, nothing shows up in the specified summary index.

Any suggestions for getting disk utilization by index saved to a summary index for trend reporting?

Search head is Splunk 4.3.1.

Tags (2)
0 Karma
1 Solution

MarioM
Motivator

i am not sure if it is a typo but "server" doesnot exist(splunk_server is the right field) and when i do the following it works for me:

| rest /services/data/indexes | table splunk_server,title,currentDBSizeMB | sort - currentDBSizeMB | collect index=summary_rest

View solution in original post

0 Karma

MarioM
Motivator

i am not sure if it is a typo but "server" doesnot exist(splunk_server is the right field) and when i do the following it works for me:

| rest /services/data/indexes | table splunk_server,title,currentDBSizeMB | sort - currentDBSizeMB | collect index=summary_rest
0 Karma

MarioM
Motivator

for records i am running v5.0.1

0 Karma

reed_kelly
Contributor

OK. It's working now. I have no idea why it took so long to populate. The typo was in the above question, but it was not in the query on the server. I don't have an explanation, but I'm going to accept your answer.

0 Karma

reed_kelly
Contributor

Are you saying that your summary index gets populated? What version are you running?

0 Karma

reed_kelly
Contributor

Update: I tried adding "|collect index=my_summary" to the end of the search and nothing was saved to the summary index. It didn't matter if I ran it interactively. I can see the results in the GUI, but nothing gets written to the summary index.

0 Karma
Get Updates on the Splunk Community!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...