Deployment Architecture

How do I redirect logs from the default main index to a new index?

nls7010
Path Finder

We are trying to set up to log container logs into Splunk 6.6.3.

We have set up an index and an application with an inputs.conf file and successfully updated the Splunk forwarder with the information inside the container. However, when we see the files coming in, they appear to be ignoring the app settings that includes our index and instead are sending the ingested logs to the main index.

How do I redirect them to the correct index (not the main index)?

0 Karma

nls7010
Path Finder

Question. What belongs in the [mysourcetype] in the props.conf? Is it looking for a sourcetype value?

0 Karma

pruthvikrishnap
Contributor

You can also override your index on heavy forwarder of indexer `

On your indexer or heavy forwarder:

# etc/system/local/transforms.conf
[overrideindex]
DEST_KEY =_MetaData:Index
REGEX = .
FORMAT = my_new_index

#etc/system/local/props.conf
[mysourcetype]
TRANSFORMS-index = overrideindex`

also route your data https://answers.splunk.com/answers/1026/route-data-to-index-based-on-host.html.

Let me know if this helps

0 Karma

nls7010
Path Finder

I will work with my client and let you know if the redirection will work. Thank you for your reply.

0 Karma

renjith_nair
Legend

@nls7010, Is your inputs.conf in app is being considered while forwarding? Suggest to check the file precedence. Try running a btool on inputs and see which configuration is considered for your log files

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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