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!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...