Splunk Search

How to specifiy incoming source type to a specific index?

gingerpower121
Explorer

I understand you have to modify the indexes.conf, props.conf, and transforms.conf inside of the $SPLUNK/etc/system/local directory but I am completely lost what to fill in. I have the documentation for each file pulled up but I'm still not getting very far.

The only file I've really changed is the indexes.conf:

[cisco_asa]
sourcetype = cisco:asa
disabled = 0
index = cisco_asa
frozenTimePeriodInSecs = 15800000

EDIT:
I'm trying to separate my ASA to it's own index for different retention policies and a smaller database. The ASA already comes across splunk as "cisco:asa" so I'm mostly trying to match that source type to a index. Although in the future I'd like to start specifying by IP address to an index.

I've made some changes and this is what I have but still no luck:

indexes.conf:
[cisco_asa]
disabled = 0
frozenTimePeriodInSecs = 15800000

props.conf:
[cisco:asa]
TRNASFORMS-8_AssignToIndex = cisco:asa

transforms.conf:
[cisco:asa]
REGEX = .
DEST_KEY = _Metadata:Index
FORMAT = cisco:asa

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

The most common settings for the indexes.conf file can be set in the GUI by selecting Settings->Indexes. In your example, the sourcetype and index attributes are not valid in indexes.conf. The index name is set by the stanza name and sourcetype goes in props.conf. You use index in inputs.conf.

Be careful to not confuse the documentation for each config file. Attributes for one file do not necessarily apply to others.

I think you're close with your transforms attributes. Try FORMAT = cisco_asa.

---
If this reply helps you, Karma would be appreciated.

gingerpower121
Explorer

My goal is to move my ASA to a different index for a smaller retention policy and less storage. The ASA sourcetype already shows up as being "cisco:asa" so I'm mostly trying to match that source type to an index. Although in the future I would like to setup indexes by IP address.

I've made a few changes to my config:

index.conf:
[cisco_asa]
disabled = 0
frozenTimePeriodInSecs = 15800000

props.config:
[cisco:asa]
TRNASFORMS-8_AssignToIndex = cisco:asa

transforms.conf:
[cisco:asa]
REGEX = .
DEST_KEY = _Metadata:Index
FORMAT = cisco:asa

Still no luck but any idea what I'm missing?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Please see my updated answer.

---
If this reply helps you, Karma would be appreciated.
0 Karma

gingerpower121
Explorer

Changed last line to cisco_asa but still didn't switch.

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!

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 ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...