Getting Data In

sourcetype not getting overridden

abhayneilam
Contributor

I have an inputs.conf
[monitor:///tmp/a.txt]
index=a
sourcetype=AA

Now,I want to over write the sourcetype in HF as mentioned in the Splunk docs.
props.conf
[source::/tmp/a.txt]
SHOUlD_LINEMERGE=false
sourcetype=BB

But, my sourcetype is not getting over written, I am getting the same sourcetype as AA in my IDX server. How to correct it

0 Karma

somesoni2
Revered Legend

You'd have to use the transforms to update the sourcetype metadata, like this

props.conf

[source::/tmp/a.txt]
SHOUlD_LINEMERGE=false
TRANSFORMS-overridest = override_st

transforms.conf

[override_st]
REGEX = .
FORMAT = sourcetype::BB
DEST_KEY = MetaData:Sourcetype

This will be your reference Splunk documentation for the same: http://docs.splunk.com/Documentation/Splunk/7.0.3/Data/Advancedsourcetypeoverrides

abhayneilam
Contributor

Do I have to make it HF ? or IDX ? ...

0 Karma

somesoni2
Revered Legend

Whichever comes first in data from source. Generally if you're using HF, before index, set this up in HF. A restart of splunkd service would be required and it'd only affect the new events that come after you set this up.

0 Karma

abhayneilam
Contributor

If I have UF---HF---IDX then ?

0 Karma

somesoni2
Revered Legend

Still in HF (first Splunk Enterprise instance in the flow, after UF first Splunk Enterprise instance is HF, so HF).

0 Karma

abhayneilam
Contributor

No , it is not working .

sourcetype is not getting renamed in HF. But If I do in IDX it is working ..

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...