Splunk Search

How to rename an index or move everything we have in the main index into another index?

ralphw_SAIC
Path Finder

Splunk 6.2.3 on RHEL6. We are growing and I would like to have some consistency in our index naming convention. So, I would like to move everything we have in MAIN into another index.

Is it as easy as cp -rp $SPLUNK_DB/* /foo/bar/ and changing the incoming feeds to point to the new index?

Thanks,

Tags (2)
1 Solution

somesoni2
Revered Legend

Almost correct, with additional step to stop the splunk before and start after index data copy. See detailed steps here

http://answers.splunk.com/answers/5479/how-to-rename-an-index.html

View solution in original post

somesoni2
Revered Legend

Almost correct, with additional step to stop the splunk before and start after index data copy. See detailed steps here

http://answers.splunk.com/answers/5479/how-to-rename-an-index.html

ralphw_SAIC
Path Finder

Tried the above link and logs were still going to main. Only the local splunk server was sending anything to the new index. I updated inputs.conf with "index = NEW_INDEX" before I started splunk back up.

Any ideas on why nothing external was going to the new index? We are using the Universal Forwarder, if that helps any, on our clients.

0 Karma

rphillips_splk
Splunk Employee
Splunk Employee

Splunk Universal Forwarder

0 Karma

ralphw_SAIC
Path Finder

No I did not. It did not sound like I needed to from the docs. I will give this another go tomorrow.

Thanks,

0 Karma

rphillips_splk
Splunk Employee
Splunk Employee

did you update your UF inputs.conf monitor stanzas as well to include the index= NEW_INDEX and restart?

ralphw_SAIC
Path Finder

Sorry to sound like an id10t, but what do you mean by "UF"?

Also, I only updated inputs.conf on the server. At least that is how I read it. Do I also need to update it on the clients?

0 Karma

somesoni2
Revered Legend

If by client you mean where you Universal forwarders are installed, then yes, you need to update inputs.conf only on clients. In every type of input (monitoring/batch/script/perfom/eventlog etc) just change the reference of index = main OR wherever index is missing, with index= NEW_INDEX.

0 Karma
Get Updates on the Splunk Community!

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...