Getting Data In

Routing to index based on host not working

cmlombardo
Path Finder

Hello there.

I have IIS logs being ingested into Splunk.

The sourcetype is currently set to "iis:test"

props.conf:

[iis:test]
TZ = UTC
TIME_FORMAT = %Y-%m-%d %H:%M:%S
TRANSFORMS-8_AssignToIndex = setindex_dev, setindex_qa, setindex_stage, setindex_prod

transforms.conf:

[setindex_dev]
SOURCE_KEY = MetaData:Host
REGEX = (?i)^host::web-dev-2\d{1}.*$
DEST_KEY = _MetaData:Index
FORMAT = wf_dev_i

[setindex_qa]
SOURCE_KEY = MetaData:Host
REGEX = (?i)^host::web-qa-2\d{1}.*$
DEST_KEY = _MetaData:Index
FORMAT = wf_qa_i

[setindex_stage]
SOURCE_KEY = MetaData:Host
REGEX = (?i)^host::web-stg-2\d{1}.*$
DEST_KEY = _MetaData:Index
FORMAT = wf_stage_i

[setindex_prod]
SOURCE_KEY = MetaData:Host
REGEX = (?i)^host::web-2\d{1}.*$
DEST_KEY = _MetaData:Index
FORMAT = wf_prod_i

 

This should send the events coming from the host web-dev-20 to the wf_dev_i index. Instead, they go to the main index.


I have the same configuration set for other sources and it works fine.

What am I missing here?


Thank you,

Claudio

Labels (2)
0 Karma
1 Solution

cmlombardo
Path Finder

Ciao Giuseppe,

props.conf and transforms.conf are on our HFs.

Since my post, I was able to finally find out what happened. The transforms names we chose were already used in other transformations elsewhere. What are the odds? Hilarious.

After checking so many times the syntax and the regexes I decided to take a look at all the transformations in place and found the culprit.

Now that the new transformations have a different name, everything works as expected.

Claudio

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @cmlombardo,

where did you located this props and transforms files?

They must be located in the Indexers or, if present in the first Heavy Forwarder they are passing throgh, not on Universal Forwarder.

Ciao.

Giuseppe

0 Karma

cmlombardo
Path Finder

Ciao Giuseppe,

props.conf and transforms.conf are on our HFs.

Since my post, I was able to finally find out what happened. The transforms names we chose were already used in other transformations elsewhere. What are the odds? Hilarious.

After checking so many times the syntax and the regexes I decided to take a look at all the transformations in place and found the culprit.

Now that the new transformations have a different name, everything works as expected.

Claudio

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @cmlombardo,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

gcusello
SplunkTrust
SplunkTrust

Hi @cmlombardo,

good for you, see next time!

let me know if I can help you more, or, please, accept one answer (also your own) for the other people of Community.

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Quantify Your Splunk Investment Impact: Introducing Savings Metrics to Value Insights

Building on the foundation established in our initial Value Insights releases, we are introducing the Savings ...

Event Series: Telemetry Pipeline Management

Balancing Scale and Spend: Gaining Control Over High-Volume Metrics in Splunk Observability Cloud As ...

Kick the Tires Before You Commit: A Hands-On Tour of the Splunk Observability Cloud ...

Evaluating an enterprise observability platform usually goes like this: fill out a form, get a free trial with ...