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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...