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!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

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

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...